Unable to update page content

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
5/9/2011 8:58:15 AM
Gravatar
Total Posts 15

Unable to update page content

Dear Mojoportal

I am editor for www.essexbiodiversity.org.uk which is using Mojoportal version 2.2.4.6 MySQL hosted on win9.pipeten.co.uk. The PC that I use is operated by Ubuntu Linux, though I also update from Windows operated machines from time to time. There has generally been no problem in adding content but problems have started cropping up. 

While trying to edit the content of an existing page today I am getting this message returned;

____________________________________________________________________________

Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   mojoPortal.Business.WebHelpers.IndexBuilderConfiguration.GetConfig() +176
   mojoPortal.Business.WebHelpers.IndexBuilderManager.Initialize() +25
   mojoPortal.Business.WebHelpers.IndexBuilderManager..cctor() +68

[TypeInitializationException: The type initializer for 'mojoPortal.Business.WebHelpers.IndexBuilderManager' threw an exception.]
   mojoPortal.Business.WebHelpers.IndexBuilderManager.get_Providers() +0
   mojoPortal.Web.ContentUI.EditHtml.btnUpdate_Click(Object sender, EventArgs e) +215
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565


Version Information: Microsoft .NET Framework Version:2.0.50727.3620; ASP.NET Version:2.0.50727.3618

___________________________________________________________________________________

Can you please advise on the cause of the problem and a solution?

 

Many thanks

Tony Morton

P.S. A similar type of problem recently arose while trying to delete pages, when an Unhandled exception error message was returned to me and the website went off-line until I contacted the hosting company who were able to restore it. Their error log read as follows;

An unhandled exception occurred and the process was terminated.

Application ID: /LM/W3SVC/260/ROOT

Process ID: 19480

Exception: System.IO.IOException

Message: Lock obtain timed out:
Lock@H:\hshome\essexbp\essexbiodiversity.org.uk\Data\Sites\1\index\lucene-73
d8252cd24b7adcc9dad3f41609dd7f-commit.lock

StackTrace:    at Lucene.Net.Store.Lock.Obtain(Int64 lockWaitTimeout)
   at Lucene.Net.Store.Lock.With.Run()
   at Lucene.Net.Index.IndexReader.Open(Directory directory, Boolean
closeDirectory)
   at Lucene.Net.Index.IndexReader.Open(String path)
   at mojoPortal.Business.WebHelpers.IndexHelper.ClearPageIndex(PageSettings
pageSettings)
   at
mojoPortal.Business.WebHelpers.IndexHelper.ClearPageIndexAsyncCallback(Objec
t o)
   at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object
state)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedClea
nup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext
executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
   at
System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_Thread
PoolWaitCallback tpWaitCallBack)
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object
state)

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

 

 

5/9/2011 1:13:44 PM
Gravatar
Total Posts 18439

Re: Unable to update page content

Hi,

The errors you are having are related to the site search index. Most likely the content updates and deletes are actually happening, but the error happens afterwards when it tries to update the search index.

I think there may be a problem with files under /Setup/ProviderConfig/indexbuilders

Please tell me the names of all files in that folder. Also you may need to check file permissions on those files to see if they are all readable by the web process user (the user that is the identity on the application pool in IIS). Possibly something about those files got corrupted or permissions change on them since it was working fine for a long time.

Other than that I would try to rebuild the search index. Do this by first backing up the folder /Sites/1/index, then delete all files from that folder and do a search and that will trigger it to rebuild the search index (as long as folder permissions are correct so it can write new files).

If all else fails it is possible to disable the search index and this would eliminate the error. You can do that by finding this to your Web.config and changing it to true.

<add key="DisableSearchIndex" value="false"/>

Just fyi, you are running a very very old version of mojoPortal, released over 3 years ago. However because it is so old it would be fairly challenging to upgrade. The version you have runs on .NET 2.0 which we no longer support and many things have changed in the way our skins aka design templates work so your current skin would need significant updates.

Hope that helps,

Joe

 

5/10/2011 8:53:46 AM
Gravatar
Total Posts 15

Re: Unable to update page content

Thanks Joe,

The files in setup/indexbuilderconfig  are these {NB the path you specified does not exist in my file structure - this is the nearest equivalent that I can see.}

/sharedfilesindexbuilder.config
/linksindexbuilder.config
/htmlcontentindexbuilder.config
/galleryindexbuilder.config
/forumthreadindexbuilder.config
/eventcalendarindexbuilder.config
/blogindexbuilder.config
/000_placeholder.config

I don't know enough about the software to know where the permissions are or how to change them. 

I have tried your suggestion of deleting the current index files, and doing a search on the site now produces a message that, "the search index is being rebuilt, wait a few minutes and re-try."  Even after 30 minutes it still repeats that message.

Thank you for the information on upgrading the Mojoportal version. Such a project would be well beyond my capabilities. Up to now the software has been working, and if it continues to do so we will leave it alone.  At some point I guess we will need to get consultants to construct a new website for us.

Regards

Tony Morton

5/10/2011 9:04:17 AM
Gravatar
Total Posts 18439

Re: Unable to update page content

Are you seeing any related errors in the log?

My best guess is that file system permissions have changed are no longer correct so it can no longer write to the /Data/Sites/1/index folder therefore it fails to rebuild the search index and since no files exist in the folder it still gives the message because it thinks the search index should be rebuilding.

Basically mojoPortal needs the /Data and /App_Data folders to be under full control for writing, deleting and updating files and folders. The user that needs permission is the user that is the identity on the application pool. If you don't know how to find that information or correct the file system permissions you may need to get your web host or someone else with more knowledge of the web server to help you.

Hope that helps,

Joe

6/2/2011 6:58:00 AM
Gravatar
Total Posts 15

Re: Unable to update page content

Thank you for your replies so far Joe. The problem has appeared again and I am given this message instead of seeing the content added to teh page which I am trying to update.

 

Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   mojoPortal.Business.WebHelpers.IndexBuilderConfiguration.GetConfig() +176
   mojoPortal.Business.WebHelpers.IndexBuilderManager.Initialize() +25
   mojoPortal.Business.WebHelpers.IndexBuilderManager..cctor() +68

[TypeInitializationException: The type initializer for 'mojoPortal.Business.WebHelpers.IndexBuilderManager' threw an exception.]
   mojoPortal.Business.WebHelpers.IndexBuilderManager.get_Providers() +0
   mojoPortal.Web.ContentUI.EditHtml.btnUpdate_Click(Object sender, EventArgs e) +215
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565


Version Information: Microsoft .NET Framework Version:2.0.50727.3620; ASP.NET Version:2.0.50727.3618

Does this message offer any further clues to the cause of the problem?

 

Regards

Tony Morton

6/2/2011 7:36:05 AM
Gravatar
Total Posts 18439

Re: Unable to update page content

That error is most likely caused by problems with those index builder files, either one of them is corrupted or the file permissions do not allow reading those files.

To be honest it is very difficult to offer support for a version of mojoPortal that old, the code has changed a lot since 2008. If there are bugs they can only be fixed by upgrading, but then again the site ran fine for a very long time and this means the current problems are not bugs but are something that changed in the installation environment or configuration such as file permissions.

Hope that helps,

Joe

6/3/2011 6:29:57 AM
Gravatar
Total Posts 15

Re: Unable to update page content

Thanks again Joe. I can see that I will need to start planning to replace the whole installation from bottom to top with an up-to-date version of the CMS and new database. I think the appearance of the skin is controlled by two .css files, do you think that it will be possible to simply transfer those over to the current version of Mojoportal and get the same layout and appearance on the webpages?  I will be using a Linux PC to do all of the maintenance so will need to choose compatible versions of all the software.

Could be an interesting project.

 

Regards

Tony Morton

6/3/2011 7:42:58 AM
Gravatar
Total Posts 18439

Re: Unable to update page content

Should be fine to manage it from any flavor of client machine, but I would only recommend Windows for the hosting environment.

Upgrading from such an old version, you'll want to read all the release notes about versions in between your current one and the latest, and you'll want to read the upgrade article as well as the sticky thread of skin changes across versions (though it doesn't go back that far). Probably the safest bet will be to change it to one of the included skins after upgrading, ie after upgrading copy the latest skins from /Data/skins to /Data/Sites/[SiteID]/skins and then use one of them. Afterwards you can see about reconstructing or updating your old skin.

Obviously you'll need to back up everything to make sure you can restore back to the old version if something goes wrong. It would be best to get a copy of the site working on your local machine and do a practice upgrade there.

Hope that helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.