0

I am trying to upgrade dxa 1.5 to 1.8 for sites 9.1. Following is the .net version of my web application: 4.6.2

after all required steps are completed web application has started loading. but for a couple of pages, it has started showing 500 internal server error. in the log file it says as follows:

There is an error in XML document (1, 293).
System.InvalidOperationException: There is an error in XML document (1, 293). ---> System.Xml.XmlException: Data at the root level is invalid. Line 1, position 293.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlReader.MoveToContent()
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read34_Page()
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   --- End of inner exception stack trace ---
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   at System.Xml.Serialization.XmlSerializer.Deserialize(TextReader textReader)
   at DD4T.Serialization.XmlSerializerService.Deserialize[T](String input) in C:\projects\dd4t-model\source\DD4T.Serialization\XmlSerializerService.cs:line 110
   at DD4T.Factories.PageFactory.GetIPageObject(String pageStringContent) in C:\projects\dd4t-core\source\DD4T.Factories\PageFactory.cs:line 280
   at DD4T.Factories.PageFactory.TryFindPage(String url, IPage& page) in C:\projects\dd4t-core\source\DD4T.Factories\PageFactory.cs:line 121
   at Sdl.Web.Tridion.Mapping.DefaultContentProvider.GetPage(String urlPath, Localization localization)
   at Sdl.Web.Tridion.Mapping.DefaultContentProvider.GetPageModel(String urlPath, Localization localization, Boolean addIncludes)
   at Sdl.Web.Mvc.Controllers.PageController.Page(String pageUrl)

the page I am trying to access is: http://localhost:82/contact/index Though the same page is working on the legacy environment [dxa1.5, and web 8.5]

It will be helpful if anybody can show some direction on this.


@Jaime Santos Alcón: you are correct.

this issue has been fixed by installing si4t storage extension in deployer. as si4t storage extension was not present in deployer comment line like index data pushed by si4t tbb was not getting removed and making xml which was stored in broker db after publishing to invalid xml.

thank you all for your help.

  • on further investigation i found that same page is working properly with DXA page template like Content but custom application specific templates are showing above error. after comparison we have found that custom PT has 1 extra tbb related to search indexing. which is not yet updated for dxa 1.8. [it's a miss from my end]. i am doing it will keep you posted. still you can guide me if i am moving towards right direction or not. – soumava sarkar Feb 4 at 6:14
  • May be this will give you some idea on what could be the issue and how to fix tridion.stackexchange.com/questions/15990/… – Hem Kant Feb 4 at 9:48
  • I moved the self-answered comment to the original post. Soumava, based on that update, please consider accepting @Jaime's answer as correct. – Alvin Reyes Feb 19 at 9:30
5

That seems like the template you are using to publish such page is not using the DD4T Template Building Blocks or the format it uses to generate the output is incorrect. Double check the TBBs within the page template for such page, chances are you are publishing JSON and DD4T MVC app is expecting XML or you are not even publishing JSON/XML (due to the template using the default tbbs that generate html).

Update: I just saw your own comment, that 'extra' TBB is what is causing the output's incorrect format. If it is a SI4T tbb, then it adds some markup to the output which then is cleaned out by a deployer extension. If that's the case, make sure that you also update such deployer extension (if needed)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.