problems with blog en poll

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.
1/26/2008 12:26:29 PM
Gravatar
Total Posts 9

problems with blog en poll

I just installed the latest release with mySQL. I'm having some problems with the blog module. When i change the setting from "Allow Comments for 90 days" to "Allow Comments for Unlimited days" no new comments can be posted?

For de poll module to work i had to set <add key="DisablePageViewStateByDefault" value="false" /> in the web.config. Is this the way to get the poll module to work?

And i can't download the file http://www.mojopotal.com/Data/Sites/1/business1.zip

I'm pretty new at mojoportal, it is very possible i'm doing something wrong here. Can anyone give me a pointer?

Thanks for your help,

Rogan

1/26/2008 1:28:14 PM
Gravatar
Total Posts 18439

Re: problems with blog en poll

No that is not needed to make the poll work.

Are you sure it didn't work? Its kind of slow after it first compiles but after the first few requests it works faster. Maybe you just thought it wasn't working because of the delay.

I also cannot replicate the problem you describe with the blog comments. This site uses MySql and I just tested setting my most recent post to unlimited and it worked for me. Also tried it here on local machine with MS SQL and it works correctly.

There is something strange with that link. I edited it on the community download page and it works there but the link in your post doesn't work but looks correct.

Joe

1/26/2008 5:32:22 PM
Gravatar
Total Posts 9

Re: problems with blog en poll

Hello Joe,

Thanks for your response.

Strange, the link in my post still not work, but the link from the community downloads now does, problem solved!

The problems i have with the poll en blog still remain. I uploaded the latest release files (2.2.4.6-b) to my IIS server (overwritting the previous VS2005 build from source files 2.2.4.6) and it did not work. Now i will try and build the source files 2.2.4.6-b with VS2005 and upload this to my server. I will let you know how this turns out.

Maybe the problems comes from my browser (IE 7).

Thanks,

Rogan

 

 

1/29/2008 5:54:51 AM
Gravatar
Total Posts 9

Re: problems with blog en poll

Hello Joe,


I looked brief into the source code for the above mentioned problem i have with the blog module. As far as i can tell the following happens. When i set "Allow Comments for Unlimited days" then blog.AllowCommentsForDays is set to zero.

file BlogEdit.aspx.cs
protected void btnUpdate_Click(object sender, EventArgs e)
{
...
blog.AllowCommentsForDays = allowComentsForDays; //allowComentsForDays==0
...
}

Then when i try to post a comment:

file BlogView.aspx.cs
private void btnPostComment_Click(object sender, EventArgs e)
{
...
DateTime endDate = blog.StartDate.AddDays((double)blog.AllowCommentsForDays);
if (endDate < DateTime.UtcNow) return;
//the method exits here because endDate=StartDate+0
...
}

So i am surprised that you can't replicate the problem.
Probably i'm missing the point but i don't se where or why. Can you help me out?

Rogan

1/29/2008 6:24:05 AM
Gravatar
Total Posts 18439

Re: problems with blog en poll

Hi,

I may have misunderstood the poblem. I thought you were saying the comment form wasn't displayed. I agree the logic in the code there just before where you put the comment should be changed. I will fix that for the next release. You can go ahead and change that line to this:

if ((endDate < DateTime.UtcNow)&&(blog.AllowCommentsForDays > 0)) return;

Thanks,

Joe

1/29/2008 1:17:25 PM
Gravatar
Total Posts 9

Re: problems with blog en poll

Hello Joe,

Indeed, this fixes the blog problem, thanks.

I'm still having the above mentioned problem with the poll module. In the web.config you state that:

"Modules that do postback usually need
ViewState Enabled so in the Page_Load event of modules that postback
I add a line of code like this
Page.EnableViewState = true;".

But in the PollModule.ascx file this is not the case although it does postback. Could this be the reason why i'm having the problem? If i set Page.EnableViewState=true in the Page_Load event or when i set <add key="DisablePageViewStateByDefault" value="true" /> in the web.config then the poll module works fine.

I hope i'm not bothering you to much with my problems.

Rogan

1/29/2008 1:51:12 PM
Gravatar
Total Posts 18439

Re: problems with blog en poll

Hi Rogan,

I add a line of code like this
Page.EnableViewState = true;

Did that fix it for you?

Its true this module does postback but it does ajax postback using UpdatePanel so it doesn't interfere with other content modules on the page.

I'm not opposed to adding that line of code if it fixed it, but it works for me so I think something is different on your environment.

The MS AJAX dll, System.Web.Extensions.dll is included with the source but if you have installed a different version on your machine using the installer then the version in your GAC may take precedence over the one in the bin folder and this could be a factor. Maybe you have an older version in the GAC.

Also if you are using a custom skin maybe you don't have this in your layout.Master:

<asp:ScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server" />

Hope it helps,

Joe

1/30/2008 1:47:59 PM
Gravatar
Total Posts 9

Re: problems with blog en poll

Hello Joe,

Yes, when i add Page.EnableViewState = true my poll problem is fixed.

No, i am not using any custom skin.

So the cause of the poll problem must indeed be within my local environment. The reason i did not think of that first was because i tried it at home (localhost), at work (localhost) and at my webhost, with a clean build from the source with an empty mySQL DB. In all 3 cases i got the same problem.

Anyway, i know now how to solve it.

Thanks again,

Rogan

 

1/30/2008 1:52:21 PM
Gravatar
Total Posts 18439

Re: problems with blog en poll

Ok, do you want me to add that line of code to the Poll?

Page.EnableViewState = true;

Or was the problem solved without it?

Thanks,

Joe

1/30/2008 1:58:36 PM
Gravatar
Total Posts 9

Re: problems with blog en poll

Hello Joe,

Not so important.

But the reason the download link i mentioned in my first post, http://www.mojopotal.com/Data/Sites/1/business1.zip, did not work was because of the typo: mojopotal.

Rogan

1/30/2008 2:11:39 PM
Gravatar
Total Posts 9

Re: problems with blog en poll

Hi Joe,

I don't think you need to add that line of code since i'm the only one with this problem. I just add it myself to the PageLoad event. Otherwise everyone else gets that line of code without actually needing it.

Rogan.

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