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

12/27/2009 10:01:45 AM
Gravatar
Total Posts 171
I am a Russian programmer

Re: Serious error on fast computers

Thanks, Joe

but about ChildPageMenu

Can you add field [IncludeInChildPageMenu] bit NULL in TABLE mp_Pages

and than change

ChildPageMenu.ascx.cs

if (!mapNode.IncludeInMenu) remove = true;

to

if ((!mapNode.IncludeInMenu) && (!mapNode.IncludeInChildPageMenu)) remove = true;

12/27/2009 10:03:37 AM
Gravatar
Total Posts 18439

Re: Serious error on fast computers

No, sorry, I do not see a need for that.

Best,

Joe

12/27/2009 10:08:57 AM
Gravatar
Total Posts 171
I am a Russian programmer

Re: Serious error on fast computers

Why show the submenu at the same time in the menu and the ChildPageMenu?

It looks not very nice

Alexander

12/27/2009 10:14:52 AM
Gravatar
Total Posts 18439

Re: Serious error on fast computers

Then don't show the child page index. Whether it looks nice is a different issue than whether we need more options for hiding things.

I have pages like that such as Installation documentation page, it does not make sense to hide just some pages from the child page index if they are showing in the menu, it does not solve the issue of whether it looks nice to have the menu duplicated if I remove a few pages I might as well not show the child page index at all if I think it doesn't help.

Best,

Joe

12/27/2009 10:15:17 AM
Gravatar
Total Posts 171
I am a Russian programmer

Re: Serious error on fast computers

Idea!

add to user.config

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

and than in

ChildPageMenu.ascx.cs

if xxxxxxxxx == true
  if (!mapNode.IncludeInMenu) remove = true;
 

12/27/2009 10:21:45 AM
Gravatar
Total Posts 18439

Re: Serious error on fast computers

Ok, I'll change it like this:

if (treatChildPageIndexAsSiteMap)
{
if (!mapNode.IncludeInSiteMap) { remove = true; }
}
else
{
if (!mapNode.IncludeInMenu) { remove = true; }
}

and you can enable it by adding this to your user.config:

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

Best,

Joe

12/27/2009 10:37:50 AM
Gravatar
Total Posts 171
I am a Russian programmer

Re: Serious error on fast computers

Joe, Thank you very much!

This is the best version

Best regards, Alexander

12/27/2009 10:39:31 AM
Gravatar
Total Posts 18439

Re: Serious error on fast computers

Glad that will work for you.

Don't forget to send the Russian resources again, I did not receive it.

Best,

Joe

12/27/2009 11:28:53 AM
Gravatar
Total Posts 171
I am a Russian programmer

Re: Serious error on fast computers

I sent the file

Joe, check your mail

Best regards, Alexander

12/27/2009 11:34:56 AM
Gravatar
Total Posts 18439

Re: Serious error on fast computers

Thanks! Got it this time.

I will have this in svn trunk by tonight sometime.

Best,

Joe

12/28/2009 2:42:38 AM
Gravatar
Total Posts 171
I am a Russian programmer

Re: Serious error on fast computers

and more ...

add in SchemaUpgradeScripts

UPDATE
mp_Pages
SET
[Url] = ''
WHERE
[Url] = '~/' AND UseUrl = 0

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

Re: Serious error on fast computers

and more ...

add in Web.config

<add key="SwfObjectUrl" value="~/ClientScript/SwfObject/2.2/swfobject.js" />
 

12/29/2009 3:24:09 AM
Gravatar
Total Posts 171
I am a Russian programmer

Re: Serious error on fast computers

Joe, please add configuration parameter

Web.config

<add key="ChildPageMaximumDynamicDisplayLevels" value="20" />

ChildPageMenu.ascx.cs

private int childPageMaximumDynamicDisplayLevels = 20;

protected void Page_Load(object sender, System.EventArgs e)

childPageMaximumDynamicDisplayLevels = WebConfigSettings.ChildPageMaximumDynamicDisplayLevels;

private void ShowChildPageMap()

change

SiteMap1.MaximumDynamicDisplayLevels = 20;

to

SiteMap1.MaximumDynamicDisplayLevels = childPageMaximumDynamicDisplayLevels;

WebConfigSettings.cs

public static int ChildPageMaximumDynamicDisplayLevels

{
  get { return ConfigHelper.GetIntProperty("ChildPageMaximumDynamicDisplayLevels", 20); }
}
-----------------------------------------------------

or instead, add a field 'ChildPageMaximumDynamicDisplayLevels' in a table mp_Pages

how do you feel more comfortable, but if you add a new field, it will add more features

12/29/2009 5:35:26 AM
Gravatar
Total Posts 18439

Re: Serious error on fast computers

I'll add a properties on the ChildPageMenu control so it can be set from the layout.master file in the skin like this:

<portal:ChildPageMenu id="ChildPageMenu" runat="server" CssClass="txtnormal" MaximumDynamicDisplayLevels="20" UsePageImages="true" HidePagesNotInSiteMap="true" />

I changed the other settings there as well instead of Web.config so they can be per skin rather than global across all sites.

Best,

Joe

12/30/2009 2:49:29 AM
Gravatar
Total Posts 171
I am a Russian programmer

Re: Serious error on fast computers

Thank you, Joe  ! I see it in SVN !

But there is another problem.

CssClass for ChildPageMenu not appear in aspx file for browser

I added line SiteMap1.CssClass = CssClass;

in ChildPageMenu.ascx.cs but no change in aspx file for browser

Best regards, Alexander

12/30/2009 3:26:51 AM
Gravatar
Total Posts 171
I am a Russian programmer

Re: Serious error on fast computers

Joe, another problem

Printable View for the pages that contain ChildPageMenu is not valid
This page displays all sitemap and properties of ChildPageMenu for our layout.master not work

Best regards, Alexander

12/30/2009 6:24:05 AM
Gravatar
Total Posts 18439

Re: Serious error on fast computers

Ok, I'll add the TreatChildPageIndexAsSiteMap config setting so you can either set it on the control or set it globally with config.

Css is rendered on the page like this:

<div class="sitemap" id="ctl01_ChildPageMenu_SiteMap1">

I will change it to have this:

<div class="sitemap childpagesitemap" id="ctl01_ChildPageMenu_SiteMap1">

so you can style it with

.childpagesitemap ul {}

etc.

You should not make changes in the code to set css classes.

Best,

Joe

1/1/2010 8:06:29 AM
Gravatar
Total Posts 171
I am a Russian programmer

Re: Serious error on fast computers

Thank you Joe. It works fine!

But I have a few problems. My site has several modules news.
I want to use Blog module, as "News", "New on the site", "Plans for the future". But I miss some of the settings.
Could you add them to the module settings "blog"

1) Format of Date.
Now the date format is taken from
BlogDateTimeFormat = CultureInfo.CurrentCulture.DateTimeFormat.FullDateTimePattern;
Could you do that to date format was taken from the module settings blog? I need to show to date news in a specific format for each news stream on the site


2) Ability to enter the category of news, even if turned off " Show Categories"
I need it because I develop a module for mojoportal ("Links by Categories"). This module will have two options. Blog Name and Category. It is very important for the internal pages of site and will select from the news stream all posts on the Categories.
 

3) Settings the module: 'Only title'.

For this blog module configuration should show only headlines and nothing more.
 

4) Blog settings to disable URL checking when Update Post (The Url is already in use. The Url is already in use. You cannot use the same Url for different pages).
Why is it necessary. I want to use module blog for section " new on the site". Therefore, when you click on the "Title" user must go to the page that has changed and URL will contain the page address have changed


5) Configure the module blog, which will display the messages from the current date.
It is necessary that output plans for the future.
 

Best regards, Alexander
 

1/2/2010 5:30:20 AM
Gravatar
Total Posts 18439

Re: Serious error on fast computers

Hi Alexander,

This thread has gone way past its original topic.

To suggest new features you should start a new thread on the Feature Requests forum (if you don't already see similar requests).

I consider all suggestions but I cannot promise to answer every post or deliver every improvement requested. I will say that a date format setting is on my list of things to do for blog improvements.

Best,

Joe

1/2/2010 7:15:18 AM
Gravatar
Total Posts 171
I am a Russian programmer

Re: Serious error on fast computers

Hi, Joe

I created a new topic "Improvement blog" and Added to this topic one more question

Best regards, Alexander

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