SimplePortal

Support => English Support => Topic started by: slop_chute on January 17, 2011, 09:24:03 AM

Title: Basic SP Page problem
Post by: slop_chute on January 17, 2011, 09:24:03 AM
SMF Version:   2 RC4
SP Version:   2.3.3

Mods installed

1.Avatar Verification         1.4.1    
2.Join date and Location in Posts   1.1    
3.Gamer IDs            1.02    
4.Aeva ~ Auto-Embed Video & Audio   7.1    
5.SimplePortal            2.3.3    
6.Copyright & Footer Links | S-Ace   3.1    
 
Problem:

I created a basic html page with the SP page option. In a html block on the portal there is hyperlink to this page. When logged in as a user this page works with no problem

Regardless of permissions I must set page permissions to "ignore permissions" for guests to see this page. Also noted the when a new guest selects the hyperlink the html content for the page is not rendered. Basically header and footer and everything else is there, except for the contents of the html page (created with the page option). 

To get this to work the guest must select the home link and reselect the hyperlink in the portal block. Then the page renders correctly for the guest.

Comparing urls for the page id are the same when it works and does not. Also no errors in the log. Monitoring the network via firebug nothing was noted. Issue duplicated on firefox, IE and Chome. 

I would suspect that either I have something set incorrectly, or assuming this functions as a add-on page like php-fusion and that not being the case. 

Any insight is appreciated...

Title: Re: Basic SP Page problem
Post by: AngelinaBelle on January 17, 2011, 12:03:42 PM
Please provide:

* Link that I can use to see the problem myself
 
* A picture of all the permission settings for that page.
 
Thanks
Title: Re: Basic SP Page problem
Post by: slop_chute on January 17, 2011, 12:38:16 PM
I cleared the original block and created a new block for test purposes. Also thinking with custom permission profile had something to do with that I set every thing back to default to simplify...

Link - hXtXp://www.veteranwargamer.com

Clearing all cache and going to the page directly works link - hXtXp://www.veteranwargamer.com/index.php/page,page1229.html

I created a new bbc block just for test purposes with the link it. Block is called WC2

By clicking the link with a cleared cache results as indicated in my OP.

Current permission for the page attached.

Thanks

Title: Re: Basic SP Page problem
Post by: slop_chute on January 17, 2011, 09:03:43 PM
Additional info:

I found this post as its similar behavior. The only difference is a link in an SP Block to an SP page instead of a forum post. I would suspect it the same issue after monitoring session activity -guest vs member. 

http://simpleportal.net/index.php?topic=4202.0 (http://simpleportal.net/index.php?topic=4202.0)


This also refers to SMF but issue is marked as resolved but not sure when.
Title: Re: Basic SP Page problem
Post by: slop_chute on January 17, 2011, 09:30:34 PM
I tested this with an  XAMMP server and could not duplicate -so I suspect this is a hosting issue. You can mark this resolved  and not SP related at this time .

Thanks

Title: Re: Basic SP Page problem
Post by: slop_chute on January 18, 2011, 07:49:08 AM
Follow up

When creating a block with a  hyperlink to post or any other place in the forum will work. I thought maybe phpsuexec issue  on my host, but I would think that any link to the forum would fail in this manner. It seems that only when guest is directed to a SP page (with guest permissions) I have this issue and it seems to be session based or guest access to an SP page. I will work around by putting the content in a thread. I will do more digging on my end, but if you have any additional insight .. Thanks   

   
Title: Re: Basic SP Page problem
Post by: AngelinaBelle on January 18, 2011, 09:16:36 AM
I have no information about your site -- not even a link.
So I cannot provide any additional insight.
 
Do your URLS look like the ones in the post you reference?
Title: Re: Basic SP Page problem
Post by: slop_chute on January 18, 2011, 10:50:42 AM
Hmm- I replied to your requests and attached a screenshot.  What is funny when looking at this thread as a guest I don't see any of my replies. When I am logged in - I do. 

Based on your response I suspect you don't see my replies -

Thanks
Title: Re: Basic SP Page problem
Post by: slop_chute on January 18, 2011, 11:08:47 AM
The post with my links and attachment the background is red - I assuming it has to be approved ..

Thanks

Title: Re: Basic SP Page problem
Post by: AngelinaBelle on January 18, 2011, 11:10:59 AM
It would appear I cannot view the unapproved posts and topics. I did see your most recent post.
It looks like the ones I cannot see are the ones with links and/or attachments.
 
I have reported this problem, and will get back to you when I learn anything.
 
Sorry for the confusion.
Title: Re: Basic SP Page problem
Post by: slop_chute on January 18, 2011, 12:43:05 PM
No worries :)

Thank you!
Title: Re: Basic SP Page problem
Post by: AngelinaBelle on January 19, 2011, 09:54:55 AM
I have not heard back about a solution to the "I can't see your posts" problem.
Can you try posting the link information so it doesn't LOOK like links?
 
Just leave out the http:// part.
 
Title: Re: Basic SP Page problem
Post by: slop_chute on January 19, 2011, 04:40:51 PM
Sure..

I have attempted to simply or remove some of the variables

I have removed all mods and currently set to default curve theme.

This problem seems to related based on whether a cookie is set or not.


I disabled all the blocks and have 2 test blocks on the portal.

www.veteranwargamer.com/index.php

1st top block has a hyperlink to an SP page.
2nd block has a link to an forum post.

What I have observed is that if cookies are disabled, selecting the link to the SP page the table will not be rendered.  This occurs whether you are  a guest or a member, including admin.

This happens regardless of permissions for the SP ( I tested all combinations with the same result).
This explains the OP post behavior by selecting one of the forum links (cookie gets set) and the page will function.

If I enter the url to the page directly (cookies disabled or not) the page functions correctly. 

I did noticed that for some reason when selecting the hyperlink in the block for the page, or when it fails a &/ after the session_id (cookies off) instead of & after the session_id .

The page for reference is
www.veteranwargamer.com/index.php/page=page1229

In a nutshell if you disable cookies in your browser you will exhibit the problem quickly.

I find this strange as all forum links function from blocks (hyperlink) fine except for SP pages.

Thanks for your help



Title: Re: Basic SP Page problem
Post by: AngelinaBelle on January 20, 2011, 07:11:34 AM
SMF relies on cookies just to keep you logged in. Its default setting is to use client-side cookies. SimplePortal relies on cookies, too. In general, the SMF experience is better with cookies.
 
Still, something is not quite right with how these links are handled. And I think it is an SMF problem. It might not be a bug, exactly. I'll ask the devs.
Please supply the complete contents of the two custom PHP blocks you used to create the link to the page and the link to the topic.
I am especially interested to find out if your links contain index.php
 
You have SEF(Search Engine Friendly) URLS turned on, right?
 
-------------------------------------------
Here's what seems to happen. If there is no cookie, your URL turns out to be like http://www.veteranwargamer.com/index.php?PHPSESSID=ssssssssssssssssssssssssssss&/page1229 (http://www.veteranwargamer.com/index.php?PHPSESSID=ssssssssssssssssssssssssssss&/page1229)
 
This happens until your browser creates a cookie. After the browser puts the session info in a cookie, SMF stops generating the PHPSESSID part of the URL. If you turn cookies off, you get the PHPSESSID part every single time.
 
But this URL is just plain weird, and impossible for SMF to interpret.  SMF *NEVER* uses "&" to separate parts of the query string.  It always uses ";".
 
SMF decides if an incoming URL is SEF by checking for "index.php". So SMF would assume this is a non-SEF URL. It would then find the query string like this
 
?
PHPSESSID=ssssssssssssssssssssssssssss
&
/page1229
 
where /page1229probably doesn't make any sense.
 
 
Which is completely inappropriate for SEF URLs. According to the devs (including our own Sinan), SMF checks for index.php in order to decide if the URL is a SEF URL. So an SMF url with index.php should be index.php?page=1229, or index.php?PHPSESSID=ssssssss;page=1229, since SMF always uses ";" instead of "&" to separate query elements in the URL.
 
So if you use a URL like that to access your forum, SMF will decide to use the "regular" (non-SEF) way of interpreting it.
So the first query element is PHPSESSID=sssssss
And the second one would have to be /page1229 (because ; and & work the same)
 
I'm not so sure about "/" as the first character of a query element name.
 
Title: Re: Basic SP Page problem
Post by: slop_chute on January 20, 2011, 08:01:26 AM
I just found it the problem - 

What is puzzling this worked with once a cookie was set. I would of thought I would of got a page not found.

the "/" was the key.

the url in the block was

Code: [Select]
<a href="http://www.veteranwargamer.com/index.php/page=page1229">mission</a>
fix

Code: [Select]
<a href="http://www.veteranwargamer.com/index.php?page=page1229">mission</a>
 facepalm.

Not sure how I did this but - considering what was going on it had to be something stupid

Thanks
Title: Re: Basic SP Page problem
Post by: slop_chute on January 20, 2011, 08:02:17 AM
Thanks for your help regardless !
Title: Re: Basic SP Page problem
Post by: AngelinaBelle on January 20, 2011, 08:25:39 AM
LOL!  I assumed you were using SEF URLS.
I should have asked for an exact copy of that custom block.
Title: Re: Basic SP Page problem
Post by: slop_chute on January 20, 2011, 03:05:25 PM
Actually, I was at the time - I turned it back on and that is where I got the link from.

I was wondering where I picked that up, and bingo -

I turned it off while looking at this issue, so I could see what was going on.   

So when you create a an SP page with SEF turned on that is what you get.

Well if works fine not using the SEF link. If you do it seems to not like it.






 



 

Title: Re: Basic SP Page problem
Post by: AngelinaBelle on January 20, 2011, 04:16:25 PM
What really doesn't work is a halfway-SEF link.
Anything that contains index.php says "not SEF" to SMF.
 
But a totally not-SEF link will always work, even with SEF on.
 
Glad you figured it out.
 
Title: Re: Basic SP Page problem
Post by: slop_chute on January 21, 2011, 08:07:02 AM
Hi,

Okay to make sure I get what your saying of this behavior, I will summarize just to make sure I did not miss something. I retested this on server XAMPP and got the same result.


For example:

Varible : SEF enabled
Variable: cookies enabled

1)Create the SP Page:

I go to the SP page and create a custom html page.


I create a page for example with the contents of "123" and save it (page3203)


I go to the page list and select select the hyperlink for the page and the page is     displayed


In the browser url bar the url for the SP page is:

Code: [Select]
http://www.example.com/index.php/page,page3203.html

2) Create a block:

I create an an HTML block the contents of the block only has a "a tag" or link to the page above.

Code: [Select]
<a href="http://www.example.com/index.php/page,page3203.html">link1</a><br />
then save the block.


Vistor behavior:

A visitor to the site with no cache or cookie set (phpsessionid in url), upon selecting the hyperlink in the block will render the blank page and will not work until a cookie is set. Disabling cookies will exhibit this behavior 100% and the visitor will never see the page.

To correct this, the hyperlink in the block to the page must be the non SEF link or in the form of :

Code: [Select]
<a href="http://www.example.com/index.php?page,page3203.html">link1</a><br />
or turn SEF off.

Correct behavior ?


Thanks

Title: Re: Basic SP Page problem
Post by: AngelinaBelle on January 21, 2011, 10:10:54 AM
Code: [Select]
<a href="http://www.example.com/index.php?page=page3203.html">link1</a><br />This form of the link should always work properly.
Title: Re: Basic SP Page problem
Post by: slop_chute on January 21, 2011, 10:23:26 AM
Okay - thanks for all your help in this matter.

I think the lesson here is when doing development -keep SEF off :) - This will keep you from going insane.... :)
SimplePortal 2.3.8 © 2008-2024, SimplePortal