SimplePortal

Support => English Support => Topic started by: bigguy on February 16, 2011, 12:47:06 AM

Title: Adding a page
Post by: bigguy on February 16, 2011, 12:47:06 AM
When I try to add a page to Sp it gives me a white blank page after pressing "Add Page" Anyone have any ideas as to how to fix this. ???  There are no errors in the error logs at all either and I have not added any previous pages to this site at all.
Title: Re: Adding a page
Post by: ccbtimewiz on February 16, 2011, 04:22:21 AM
First thing that comes to mind is mod_security. Check that.

If that isn't it, could you give me a better description of your environment
Title: Re: Adding a page
Post by: bigguy on February 16, 2011, 07:42:29 AM
I know it's not mod security. Two sites on the same server and one of them I can add pages to and the other I can't. Both run RC4 with the patch and SP 2.3.3. Not to many mods installed on either site. I did forget to mention one thing now that I think about it. When I press add page, it's all white except for the post box, for some reason an outline of it shows at the top of the page. You can even add crap inside that box but that is all that shows is that outline of the box and thats it. I will get s screenshot. This is the "Add page" page.
Title: Re: Adding a page
Post by: [SiNaN] on February 16, 2011, 08:20:59 AM
Hmmm. Weird, indeed. Can you quote the HTML source code of the page?
Title: Re: Adding a page
Post by: bigguy on February 16, 2011, 09:10:17 AM
framed, generated or just source.
Title: Re: Adding a page
Post by: AngelinaBelle on February 16, 2011, 12:27:19 PM
Can you quote the HTML source code of the page?
Title: Re: Adding a page
Post by: ccbtimewiz on February 16, 2011, 02:55:35 PM
What mods in particular are installed, there seems to be a lot of javascript and custom things on that page
Title: Re: Adding a page
Post by: bigguy on February 16, 2011, 05:45:34 PM
Here are the mods that are installed. Also pertaining to quoting the source code. Is that file I gave you not good enough or did you want something else. Just tell me and I'll do it. Maybe I am not understanding the question and I know I should be.
Title: Re: Adding a page
Post by: bigguy on February 16, 2011, 09:22:56 PM
The file attached to the above post is the generated source code from the page using Web Developer 1.1.9. The file attached to this post is the source code from the page in question using Web Developer 1.1.9. I'm not sure what other source code you want.

EDIT: It has a .php extension cause that is what my editor gave it so don't mind that.
Title: Re: Adding a page
Post by: ccbtimewiz on February 16, 2011, 10:14:35 PM
bigguy I believe they want the page source of the white page
Title: Re: Adding a page
Post by: bigguy on February 16, 2011, 10:35:35 PM
I have web developer add-on for firefox....it has a "view source" button....when I click it when I am on the white page and then go to view source This is what I get. I named this one index.html the last one was named source.php and the first one was named gen.php but they are all the same thing. These are only names I have given them. If I am getting this wrong then please tell me how you want me to get the source and I will. I could go to the view tab in Fire fox and press page source and that would end up with the same thing I have now.
Title: Re: Adding a page
Post by: bigguy on February 16, 2011, 10:43:53 PM
I can not quote the source in the post because it only lets me post 20000 characters
Title: Re: Adding a page
Post by: bigguy on February 17, 2011, 12:55:19 AM
Here is more source:

http://pastebin.com/edvQR835

Same thing I have posted to you here.

EDIT: also, this line does not exist in QueryString.php

Code: [Select]
\?(?:' . SID . ';)((?:board|topic
Title: Re: Adding a page
Post by: AngelinaBelle on February 17, 2011, 07:40:08 AM
Here's your problem (using developers tools to see the "after-the-js" HTML)
Code: [Select]
<body id="body" style="display: none;" instanceRef="[object Object]" addEventListener="function (sEvent, funcHandler, bCapture) {
    oTarget.attachEvent('on' + sEvent, funcHandler);
   }" removeEventListener="function (sEvent, funcHandler, bCapture) {
    oTarget.detachEvent('on' + sEvent, funcHandler);
   }" onload="">

The question is -- what caused that?
The answer seems to be simpleportal expects the textarea on that page to have an id="body". but you have <body id="body">. So the stuff that should have been applied to the textarea gets applied to the entire body because it comes first.
 
This will only happen on "page" pages.
 
Did your theme come that way (<body id="body">) or did some mod add that id for some other purpose?
 
 
Title: Re: Adding a page
Post by: bigguy on February 17, 2011, 08:34:26 AM
I found where it is. I don't think a mod did that. It must be from the theme author I guess. This is what the body tag looks like in the theme:

Code: [Select]
<body id="body" ', empty($options['collapse_header']) ? '' : '', '>';
I changed it to:

Code: [Select]
<body>';
and the add page area showed as it should. Thank you for your help. I will watch things for a bit and see how it goes. Thank you for your help. Also while parsing SP there seems to be a line that does not exist in QueryString.php The line below is not there but SP looks for it to add "page" to it:

Code: [Select]
\?(?:' . SID . ';)((?:board|topic
I searched an unedited copy of QueryString from RC4 and that line is not found anywhere.

Again thank you for the help.
Title: Re: Adding a page
Post by: AngelinaBelle on February 17, 2011, 09:50:42 AM
I was surprised to see so much "invisible" HTML on the page.
It took me a couple of runs through the debugger to figure out the obvious -- it was related to the use of the editor.
 
The issue you bring up with QueryString seems unrelated to this. If it did not cause any error on install, I would not worry about it at this time.
 
I'll take a quick look at it myself, to see if I can figure out what that one is there for, and bring it up to the devs if it seems important.
 
I have started an enhancement ticket on concerning your issue. I don't know how common your issue might be.
Title: Re: Adding a page
Post by: bigguy on February 17, 2011, 01:12:14 PM
Thanks for taking the time to look. :)
Title: Re: Adding a page
Post by: AngelinaBelle on February 17, 2011, 01:37:38 PM
Do you actually find the string "board|topic|page" in QueryString.php?
The installer actually takes 3 runs at it (you can see this at http://custom.simplemachines.org/mods/index.php?action=parse;mod=1104;attach=160883;smf_version=2.0_RC4 (http://custom.simplemachines.org/mods/index.php?action=parse;mod=1104;attach=160883;smf_version=2.0_RC4), where the first two are marked 'not vital')
 
 
Title: Re: Adding a page
Post by: bigguy on February 17, 2011, 10:39:28 PM
I never parsed it using that parser so I wouldn't have seen that. I find a few instances of board|topic and those few I found I edited to board|topic|page when I installed the mod. That one I posted about is one that is marked vital so I guess this was down to a theme issue more than anything. I should have checked the default theme while going through all this cause it worked on it.
Title: Re: Adding a page
Post by: AngelinaBelle on February 18, 2011, 08:02:15 AM
And the Package Manager install failed on QueryString.php? That's odd. But you did the changes in QueryString by hand?
 
I assume you got it right, one way or the other, because you are not reporting session problems.
Title: Re: Adding a page
Post by: bigguy on February 19, 2011, 12:34:09 AM
There are some session problems yes. Users have reported logout issues. All edits where done to the QueryString.php file though. Other than the one I posted about that I could not find.
Title: Re: Adding a page
Post by: AngelinaBelle on February 19, 2011, 12:54:16 PM
You might want to double-check the manual changes in QueryString.php, just to make sure.
There is another problem causing logout issues lately though -- please search at simplemachines.org for information about a login bot attack hitting some sites, and causing unexpected logouts.
 
I cannot know if your problem is session-related, or if it is caused by something else.
SimplePortal 2.3.8 © 2008-2024, SimplePortal