Serious error on fast computers

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.
12/23/2009 11:38:19 AM
Gravatar
Total Posts 171
I am a Russian programmer

Serious error on fast computers

On fast computers when users add content (in form PageLayout.aspx), it will not appear on the contentPane (asp:ListBox)

I found the line with error

mojoPortal.Data.MSSQL\dbModule.cs (public static IDataReader GetPageModules(int pageId))

sph.DefineSqlParameter("@CurrentTime", SqlDbType.DateTime, ParameterDirection.Input, DateTime.UtcNow);
Please replace this line to

sph.DefineSqlParameter("@CurrentTime", SqlDbType.DateTime, ParameterDirection.Input, DateTime.UtcNow.AddSeconds(1.00));


This bug is very serious for me

P.S. I translated all the help files and Resources files in the Russian language. How can I send them to you?

12/23/2009 2:37:38 PM
Gravatar
Total Posts 18439

Re: Serious error on fast computers

Hi,

What version of mojoPortal are you using?

What web browser is your user using?

The problem you report sounds more like an issue with asp:updatepanel not updating. An issue like this was recently fixed.

I work on a fast computer and this does not happen for me. 

Why do you think adding 1 second to the publish time fixes it?

To me when you say "serious error" I would think your site was crashing.

You can send me translation files at joe dot audette at g mail dotcom

Best,

Joe

12/23/2009 4:02:12 PM
Gravatar
Total Posts 171
I am a Russian programmer

Re: Serious error on fast computers

I'm using the latest version 2.3.3.2

PageLayout.aspc.cs

private void btnCreateNewContent_Click(Object sender, EventArgs e)

......

m.Save();

module.cs

public bool Save()

.....

return Create();

module.cs

private bool Create()

newID = DBModule.AddModule(
this.pageID,
this.siteID,
this.siteGuid,
this.moduleDefID,
this.moduleOrder,
this.paneName,
this.moduleTitle,
this.viewRoles,
this.authorizedEditRoles,
this.draftEditRoles,
this.cacheTime,
this.showTitle,
this.availableForMyPage,
this.allowMultipleInstancesOnMyPage,
this.icon,
this.createdByUserID,
DateTime.UtcNow,
this.guid,
this.featureGuid,
this.hideFromAuthenticated,
this.hideFromUnauthenticated);

and then in

PageLayout.aspc.cs

CurrentPage.RefreshModules();

.........

mojoPortal.Data.MSSQL\dbModule.cs

SqlParameterHelper sph = new SqlParameterHelper(GetConnectionString(), "mp_Modules_SelectByPage", 2);
sph.DefineSqlParameter("@PageID", SqlDbType.Int, ParameterDirection.Input, pageId);
sph.DefineSqlParameter("@CurrentTime", SqlDbType.DateTime, ParameterDirection.Input, DateTime.UtcNow);
return sph.ExecuteReader();

AND than see stored procedure mp_Modules_SelectByPage for MS SQL ()

WHERE
pm.PageID = @PageID
AND pm.PublishBeginDate < @CurrentTime
AND (
(pm.PublishEndDate IS NULL)
OR
(pm.PublishEndDate > @CurrentTime)
)

Do you see a mistake for fast computers ?

 

 

12/23/2009 4:11:15 PM
Gravatar
Total Posts 18439

Re: Serious error on fast computers

I think if it needs a fix then the fix I would propose is to change this:

AND pm.PublishBeginDate < @CurrentTime

to this

AND pm.PublishBeginDate <= @CurrentTime

can you try it and see if it solves the issue for you?

Best,

Joe

12/23/2009 4:17:58 PM
Gravatar
Total Posts 171
I am a Russian programmer

Re: Serious error on fast computers

Yes, this solves my problem.

12/23/2009 4:21:50 PM
Gravatar
Total Posts 18439

Re: Serious error on fast computers

Thanks for reporting this issue and testing this solution. I will have this change in svn trunk within then next 2 days and it will be in the next release.

Thanks also for your help in updating the Russian resources, please do send it  when you have a chance.

Best,

Joe

12/26/2009 8:08:02 AM
Gravatar
Total Posts 171
I am a Russian programmer

Re: Serious error on fast computers

I sent you Resources files in the Russian language.

And another problem

ChildPageMenu.ascx.cs

void SiteMap_MenuItemDataBound(object sender, MenuEventArgs e)

........

if (!mapNode.IncludeInMenu) remove = true;

better to use

if (!mapNode.IncludeInSiteMap) remove = true;

otherwise lost the logic of the ChildPageMenu

12/27/2009 3:55:03 AM
Gravatar
Total Posts 171
I am a Russian programmer

Re: Serious error on fast computers

And something else

Joe, Please add in

ChildPageMenu.ascx.cs
void SiteMap_MenuItemDataBound(object sender, MenuEventArgs e)

this code

e.Item.ImageUrl = mapNode.MenuImage;

ChildPageMenu will look nicer !

12/27/2009 4:59:16 AM
Gravatar
Total Posts 171
I am a Russian programmer

Re: Serious error on fast computers

and more :)

PageSettings.aspx.cs

private bool SavePageData()

......

pageSettings.Url = "~/" + friendlyUrlString;
change to

if (friendlyUrlString.Length != 0)

{
   pageSettings.Url = "~/" + friendlyUrlString;

}

12/27/2009 6:16:13 AM
Gravatar
Total Posts 171
I am a Russian programmer

Re: Serious error on fast computers

and more ...

PageLayout.aspx.cs

private void btnCreateNewContent_Click(Object sender, EventArgs e)

......

m.Save();

CurrentPage.RefreshModules(); <-- Put this line immediately after Save

12/27/2009 9:36:57 AM
Gravatar
Total Posts 18439

Re: Serious error on fast computers

Hi,

I did not receive the resource files, please send them again.

I don't agree about the child page menu change to check against includeinsitemap, it really is a menu. IncludeInSiteMap is meant only for the actual sitemap page.

I will make it possible to show the image but you will need to add this to user.config as it will be disabled by default:

<add key="UsePageImagesInSiteMap" value="true" />

it will also affect the real SiteMap.aspx page.

I have made your other changes in my copy.

Best,

Joe

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