Next erorr

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.
2/17/2010 10:53:17 AM
Gravatar
Total Posts 171
I am a Russian programmer

Next erorr

Hi, Joe

I have read on the forum that you want to release a new version. Do not hurry. I found a few errors in the source code. But now do not have time to write about them. Now in Russia 8 pm. I will write error messages in this topic tomorrow.

Best regars, Alexander

2/17/2010 4:40:45 PM
Gravatar
Total Posts 18439

Re: Next erorr

Hi Alexander,

I look forward to your reports. It will probably be at least another day or so before I'm ready to make a release so I am glad to get in any more fixes for bugs you identify in time for this release.

Best,

Joe

2/18/2010 3:47:00 AM
Gravatar
Total Posts 171
I am a Russian programmer

Re: Next erorr

Hi, Joe

1) EditPost.aspx.cs

String blogFriendlyUrl = "blog" + blog.ModuleId.ToString() + "rss.aspx";

if (!FriendlyUrl.Exists(siteSettings.SiteId, blogFriendlyUrl))
{
FriendlyUrl rssUrl = new FriendlyUrl();
rssUrl.SiteId = siteSettings.SiteId;
rssUrl.SiteGuid = siteSettings.SiteGuid;
rssUrl.Url = blogFriendlyUrl;
rssUrl.RealUrl = "~/Blog/RSS.aspx?pageid=" + pageId.ToString()
+ "&mid=" + blog.ModuleId.ToString();
rssUrl.Save();
}

You forget to specify the PageGuid and culture. Because of this, when you delete a blog procedures mp_Blog_DeleteBySite and mp_Blog_DeleteByModule RSS feed was not removed from the friendly URL

Change the source code to

String blogFriendlyUrl = "blog" + blog.ModuleId.ToString(CultureInfo.InvariantCulture) + "rss.aspx";
if (!FriendlyUrl.Exists(siteSettings.SiteId, blogFriendlyUrl))
{
FriendlyUrl rssUrl = new FriendlyUrl();
rssUrl.SiteId = siteSettings.SiteId;
rssUrl.SiteGuid = siteSettings.SiteGuid;
rssUrl.Url = blogFriendlyUrl;
newFriendlyUrl.PageGuid = blog.BlogGuid;

rssUrl.RealUrl = "~/Blog/RSS.aspx?pageid=" + pageId.ToString()
+ "&mid=" + blog.ModuleId.ToString();
rssUrl.Save();
}
 

2) PageSetting.aspx.cs

You forget to check the condition that the user can clear the friendly URL:

if ((txtUrl.Text.StartsWith("http"))||(txtUrl.Text == "~/"))
{
pageSettings.Url = txtUrl.Text;
}
else if(friendlyUrlString.Length > 0)
{
pageSettings.Url = "~/" + friendlyUrlString;
}
 

change to

if ((txtUrl.Text.StartsWith("http"))||(txtUrl.Text == "~/"))
{
pageSettings.Url = txtUrl.Text;
}
else if(friendlyUrlString.Length > 0)
{
pageSettings.Url = "~/" + friendlyUrlString;
}
else if(friendlyUrlString.Length == 0) {
pageSettings.Url = "";
pageSettings.UseUrl = false;
}

and more


if (
(!RedirectInfo.Exists(siteSettings.SiteId, oldUrl))
&& (!RedirectInfo.Exists(siteSettings.SiteId, newUrl))
)
{
RedirectInfo redirect = new RedirectInfo();
redirect.SiteGuid = siteSettings.SiteGuid;
redirect.SiteId = siteSettings.SiteId;
redirect.OldUrl = oldUrl;
redirect.NewUrl = newUrl;
redirect.Save();
}

change to

if (
(!RedirectInfo.Exists(siteSettings.SiteId, oldUrl))
&& (!RedirectInfo.Exists(siteSettings.SiteId, newUrl))
&& (newUrl.Length > 0)
)
{
RedirectInfo redirect = new RedirectInfo();
redirect.SiteGuid = siteSettings.SiteGuid;
redirect.SiteId = siteSettings.SiteId;
redirect.OldUrl = oldUrl;
redirect.NewUrl = newUrl;
redirect.Save();
}
 

3) Now the case for the blog. The same is not checked for an empty URL

EditPost.aspx.cs

if (!WebPageInfo.IsPhysicalWebPage("~/" + friendlyUrlString))
{
FriendlyUrl newFriendlyUrl = new FriendlyUrl();
newFriendlyUrl.SiteId = siteSettings.SiteId;
newFriendlyUrl.SiteGuid = siteSettings.SiteGuid;
newFriendlyUrl.PageGuid = blog.BlogGuid;
newFriendlyUrl.Url = friendlyUrlString;
newFriendlyUrl.RealUrl = "~/Blog/ViewPost.aspx?pageid="
+ pageId.ToString(CultureInfo.InvariantCulture)
+ "&mid=" + blog.ModuleId.ToString(CultureInfo.InvariantCulture)
+ "&ItemID=" + blog.ItemId.ToString(CultureInfo.InvariantCulture);

newFriendlyUrl.Save();
}
 

change to

if ((!WebPageInfo.IsPhysicalWebPage("~/" + friendlyUrlString))
&& (friendlyUrlString.Length > 0))
{
FriendlyUrl newFriendlyUrl = new FriendlyUrl();
newFriendlyUrl.SiteId = siteSettings.SiteId;
newFriendlyUrl.SiteGuid = siteSettings.SiteGuid;
newFriendlyUrl.PageGuid = blog.BlogGuid;
newFriendlyUrl.Url = friendlyUrlString;
newFriendlyUrl.RealUrl = "~/Blog/ViewPost.aspx?pageid="
+ pageId.ToString(CultureInfo.InvariantCulture)
+ "&mid=" + blog.ModuleId.ToString(CultureInfo.InvariantCulture)
+ "&ItemID=" + blog.ItemId.ToString(CultureInfo.InvariantCulture);

newFriendlyUrl.Save();
}

4) And even before this code, paste the code to delete the old user-friendly URL (just as you did for PageSettings.aspx.cs)

Later I'll write more about some errors (not critical, but unpleasant)

Best regards, Alexander

2/18/2010 6:21:25 AM
Gravatar
Total Posts 171
I am a Russian programmer

Re: Next erorr

Hi, Joe

Early, I wrote about non-breaking space for e-mail letter
I think the best place that would put this conversion is file
 

email.cs

mail.Body = messageBody;

if (html)
{
mail.IsBodyHtml = true;
}
 

change to

if (html)
{
mail.IsBodyHtml = true;
mail.Body = messageBody.Replace("\xA0", " ");
} else {

mail.Body = messageBody;

}
 

And. Below I present a link to the solution of this problem. But I think that my way is better

http://www.telerik.com/community/forums/aspnet/editor/question-mark-instead-of-space.aspx

Best regards, Alexander

2/18/2010 6:38:13 AM
Gravatar
Total Posts 18439

Re: Next erorr

Hi Alexander,

Thanks for your reports and suggested changes.

I've made changes you suggested with some minor variations.

I did not change it to set pageSettings.UseUrl = false; because this would introduce a bug if the use url setting is hidden as it is by default then it would result the page could never use url again because user has no access to update it. Instead I fixed mojoSiteMapProvider to check if url length is 0 and if so use the real url instead of friendly url even if useurl is true.

Best,

Joe

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

Re: Next erorr

Hi, Joe

You are right about UseUrl.

There is another serious problem.

PageSettings.aspx, field Parent Page

This field need to show ALL pages, not just Include In Menu. This fundamentally. The menu system determines the navigation system on the site. And if the menu is not visible from it and most important of his descendants can not make pages that are, for example, contain Page Crumb, and even if you create a page visible, then invisible, then visible again you'll lose the value of the field Parent Page. Should not affect visibility and can not see the possibility to make of her child and then a child of a child.

Please do, that would be in the field Parent Page show all pages of site.

Best regards, Alexander

P.S. On my site, open the form PageSettings.aspx is 5 minutes, because a lot of pages on the site. Similarly, a long time to open and form ContentManager.aspx. All other forms are displayed quickly. But I do not know how you can simply solve this problem.

2/18/2010 8:08:13 AM
Gravatar
Total Posts 18439

Re: Next erorr

Hi Alexander,

I will make this change to show hidden pages as an option for parent page, but I have a vague recollection there was an issue that required this. It may have only been a concern it would cause support issues when people create new pages but then can't find them because they are invisible.

Regarding the parent dropdown in general I agree a better solution is needed for sites with lots of pages. As you say it will not be simple to solve it, but I will ponder a strategy for this. How many pages do you have in your site? I will try to simulate the problem locally so I can measure the problem make sure my solution really solves it well. I cannot solve this before the coming release but I will try to solve it soon.

The SiteMap is a cached tree of site map nodes so it should not be a database issue, its more an issue of one should never populate a dropdown list with that many items. Maybe we need a dialog that allows paging through the list of pages or searching for a page to be the parent. I will experiment and see what I can come up with.

Best,

Joe

2/18/2010 9:33:07 AM
Gravatar
Total Posts 171
I am a Russian programmer

Re: Next erorr

Hi, Joe

It may have only been a concern it would cause support issues when people create new pages but then can't find them because they are invisible.

As a solution to this problem would be to highlight the hidden page a different color. Example gray.

About my main site:

select COUNT(*) FROM MP_PAGES where SiteID = 1

Result: 17351

maximum level of nesting of pages: 13

It would be great if resolved my problem with the performance of these two forms!

But you need to use instead of the asp:DropDownList another component.

And in the form ContentManager.aspx instead of mojoGridView another component

This component must support the regime 'load on demand'.

And more information about PageSettings.aspx. In those 5 minutes, when the page loads the CPU is 100%. I tried to work in IE and FireFox. The result of the same.

Best regards, Alexander

 

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