Error message - Blog Administration

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

11/22/2021 7:52:11 PM
Gravatar
Total Posts 49

Error message - Blog Administration

Hi there

Since we upgraded our mojoportal version a year or so ago, we now get the error below when clicking on the Expired Posts link for our Blog Administration. The URL is http://*******.org.au/Blog/ClosedPosts.aspx?pageid=1&mid=6 and redirects to http://*******.org.au/Error.htm?aspxerrorpath=/Blog/ClosedPosts.aspx

The error message is the standard Ah, shucks! message.

I am not a web developer but have some basic skills. Can anyone direct me on how I could fix this please? Who is keen for a challenge? :)

Thank you, Sandy

11/30/2021 2:14:47 PM
Gravatar
Total Posts 2202

Re: Error message - Blog Administration

Hello Sandy,

Can you cause the error and then post the last 20-30 lines of the system log?

The Basic Troubleshooting page has instructions on how to get to the log.

Thanks,
Joe

11/30/2021 3:33:42 PM
Gravatar
Total Posts 49

Re: Error message - Blog Administration

Hi Joe

Thanks for responding. Here are the logs after clicking on the link. The log errors before that are around an RSS feed link that is broken.

2021-12-01 07:58:43,584 ERROR 192.168.100.177 - en-AU - /Blog/ClosedPosts.aspx?pageid=1&mid=6 - mojoPortal.Web.Global -  Referrer(https://*******.helpinghand.org.au/Blog/Manage.aspx?pageid=1&mid=6) useragent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36 
System.IndexOutOfRangeException: IncludeImageInPost
   at System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName)
   at System.Data.SqlClient.SqlDataReader.GetOrdinal(String name)
   at System.Data.SqlClient.SqlDataReader.get_Item(String name)
   at mojoPortal.Business.Blog.GetClosedDataSet(Int32 moduleId, Int32 pageNumber, Int32 pageSize, Int32& totalPages)
   at mojoPortal.Web.BlogUI.ClosedPostsPage.BindList()
   at mojoPortal.Web.BlogUI.ClosedPostsPage.Page_Load(Object sender, EventArgs e)
   at System.Web.UI.Control.OnLoad(EventArgs e)
   at mojoPortal.Web.mojoBasePage.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Kind regards, Sandy
 

1/18/2022 2:51:29 PM
Gravatar
Total Posts 49

Re: Error message - Blog Administration

Hi Joe or anyone else

I think this error finally caught up with us. Someone added a new article which caused the Blog feature to error. The Blog is on the home page of our intranet there was an error every time someone tried to load the home page - it was the Ah Shucks page. This is from the logs, but I can't get back to the original log error where I found where the Blog was edited. Checking the SQL tables did not show anything rogue.

2022-01-18 16:06:21,940 ERROR 192.168.100.177 - en-AU - /default.aspx - mojoPortal.Web.Global - Referrer(https://<intranet-url>/Error.htm?aspxerrorpath=/default.aspx) useragent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36
System.Data.NoNullAllowedException: Column 'ItemID' does not allow nulls.

My fix was to remove the Blog feature from the home page and the home page came back up, of course without the Blog.

I can see the Blog in the Content Manager and View/Edit it. There is a red warning "This feature was not designed for publishing on multiple pages. You should not edit this feature from Content Manager, you should only edit this feature from the page it is published on."

The Blog is no longer published on any page. Is there any way to reconnect it?

Kind regards, Sandy

1/19/2022 3:27:18 PM
Gravatar
Total Posts 2202

Re: Error message - Blog Administration

Hi Sandy,

What version of mojoPortal are you using?

It would probably be best if we were able to connect to your server and take a look it that way.

You can order a support ticket from here. We won't charge anything if the problem turns out to be a bug in mojoPortal.

 

Thanks,
Joe

1/19/2022 3:59:03 PM
Gravatar
Total Posts 49

Re: Error message - Blog Administration

Thank you Joe.

mojoPortal Version: 2.7.0.0. MSSQL
Blog Schema Version: 2.6.1.9

We have a test site that I'll get our DB administrator to fresh with our live DB. I can see that I may be able to publish the Blog back to the home page but I didn't want to click the button on the live site in case it took the intranet home page offline again.

I'll log a ticket after this.

Kind regards, Sandy

1/27/2022 1:18:12 PM
Gravatar
Total Posts 1204
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Error message - Blog Administration

Joe, this is a bug. We ran into it earlier this month and I hadn't had a chance to report it. It happens if you mark any blog post as "featured". Sandy, if you turn off the "featured" check box on your blog post, it should resolve the issue for you as a workaround until Joe & Co can fix it in the code.

Jamie

1/27/2022 3:04:08 PM
Gravatar
Total Posts 49

Re: Error message - Blog Administration

Hi Jamie

Thank you for posting your experience. On my site, Joe worked out that this happened because someone deleted a post that was marked as Featured. It had to be fixed through SQL because the Blog couldn't be accessed from the GUI. I also have another issue accessing Blog Administration.

These bugs will be fixed in the next version, due for release soon!

Kind regards, Sandy

1/28/2022 9:26:52 AM
Gravatar
Total Posts 2202

Re: Error message - Blog Administration

Hey Jamie and Sandy,

The bug with Expired Posts was fixed a while back but we haven't made a formal release yet. Anyone building their own against the repo should be good to go.

The bug with Featured Post is caused, as Sandy mentioned, by marking a post as featured and then deleting that post. I've fixed it in code and will push to the repo today. You can fix it in the database by running the following SQL.

UPDATE mp_ModuleSettings SET SettingValue = '' WHERE SettingName = 'FeaturedPostId';

If you have more than one blog on your site, be sure to find your ModuleID and use this SQL instead. To find your ModuleID, go to PageManager, locate your page and click the 'Edit Page' option, then locate the blog module and click the settings icon. The ModuleID will be in the url of the Module Settings page as ?mid=MODULEID.

UPDATE mp_ModuleSettings SET SettingValue = '' WHERE SettingName = 'FeaturedPostId' AND ModuleID = MODULEID;

We have a great release in the works but unfortunately fully testing it and getting the other (mysql,pgsql,sqlite) database layers ready keeps taking a backseat to paying work. If anyone wants to help, we'd be very happy to have it.

I'm sorry this silly bug has been there so long. The fix was ridiculously easy. lol

Thanks!
Joe