This is an open forum for any mojoPortal topics that don't fall into the other categories.
Hi
Not sure if this is the right part of the forum. I think my web host has played with something as the website has been working perfectly until it was moved to another server - finally have the website working again but for some reason if I click on the key to go to the admin I am getting the following error. Any ideas.
Cheers
-------------------------------
[XmlException: Unexpected XML declaration. The XML declaration must be the first node in the document, and no white space characters are allowed to appear before it. Line 23, position 3.] System.Xml.XmlTextReaderImpl.Throw(Exception e) +76 System.Xml.XmlTextReaderImpl.Throw(String res, String arg) +126 System.Xml.XmlTextReaderImpl.ParsePI(BufferBuilder piInDtdStringBuilder) +205 System.Xml.XmlTextReaderImpl.ParseDocumentContent() +3978707 System.Xml.XmlTextReaderImpl.Read() +151 System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) +58 System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) +20 System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) +129 System.Xml.XmlDocument.Load(XmlReader reader) +108 System.Xml.XmlDocument.Load(String filename) +87 mojoPortal.Web.ContentAdminLinksConfiguration.GetConfig(Int32 siteId) +342 mojoPortal.Web.AdminUI.AdminMenuPage.BuildAdditionalMenuListItems() +73 mojoPortal.Web.AdminUI.AdminMenuPage.Page_Load(Object sender, EventArgs e) +93 System.Web.UI.Control.OnLoad(EventArgs e) +99 mojoPortal.Web.mojoBasePage.OnLoad(EventArgs e) +12 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
Hi Chris,
I would look for invalid or corrupt xml files at
/Setup/initialcontent/supplementaladminmenulinks/
and at
/Data/Sites/[SiteID]/supplementaladminmenulinks/
Hope it helps,
Joe
Wow thats was quick
What should I be looking for if they are corrupt - can I just copy from the original download files
Thanks
Yes, you can copy the one from the original download, there is only one file included unless you have added any others.
/Setup/initialcontent/supplementaladminmenulinks/00001myadminlinks.config
Found it - for some reason your code as below was doubled up - now I've never touched that file before so thats very strange.
One problem sorted - cheers
------------------------------
<?xml version="1.0" encoding="utf-8" ?> <adminMenuLinks> <!-- these are examples to show syntax for adding your own links to the Admin menu You can also put files like this that are site specific in Data/Sites/[SiteID]/supplementaladminmenulinks folder --> <!-- <adminMenuLink resourceFile="MyResource" resourceKey="test google link" url="http://www.google.com" visibleToRoles="Admins;Content Administrators" /> <adminMenuLink resourceFile="MyResource" resourceKey="test extra link2" url="~/Admin/SiteSettings.aspx" visibleToRoles="Admins;Content Administrators" /> --> </adminMenuLinks>
-----------------------------
Chris,
Assume to always keep on hand at a minimum the mojoportal-x-x-x-x-<YOUR DB>-deploymentfiles in the event this happens. XML is data, and we all know that ALL data is prone to corruption at sometime unfortuantly.
Also please note that unless you are playing around with the sourcecode itself, nearly 99% of your data that is writable is stored under the DATA folder, in which should be the one you need write perms on. Hence migration to another server should result in no data lose provide you retain the same DB stated within your User or Web.Config file.