FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » FUDforum 3.0+ » Loading next message in tree-view with PATH_INFO theme
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
icon5.gif  Loading next message in tree-view with PATH_INFO theme [message #165105] Mon, 25 April 2011 22:28 Go to next message
Fladi is currently offline  Fladi   Germany
Messages: 19
Registered: April 2011
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Hi!

This is my first post as I have no clue how to solve my little problem. Until now I found everything I need on this forum. (BTW: great!)

Here we go:
I developed a new theme based on path_info. Everything is working fine so far except one thing. When displaying a message in tree-view a new message is loaded via ajax-call (e.g. yourforum.com/index.php?t=tree_msg&id=749500). Now the new message should be loaded and displayed. On my theme the front page of the forum is displayed instead of the message.
When calling the link directly the same problem occurs. Seems like the parameters are not passed/do not get mentioned. When using the default-theme (without path_info) everything works fine. When using the "standard"-path-info theme the same problem occurs.

I set up .htaccess and got rid of index.php as described in the FAQ. The system rund on apache 2 under centos. I set up "AcceptPathInfo on" in .htaccess as well.

Any suggestions how to fix this issue? Further information needed?

Thx
-Tim
Re: Loading next message in tree-view with PATH_INFO theme [message #165106 is a reply to message #165105] Tue, 26 April 2011 09:06 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
I'm unable to reproduce the problem.

I've installed 3.0.2, enabled path_info, set the default theme to path_info, tested, and tree view works as it should.

Anything I've missed?
Aw: Re: Loading next message in tree-view with PATH_INFO theme [message #165107 is a reply to message #165106] Tue, 26 April 2011 09:35 Go to previous messageGo to next message
Fladi is currently offline  Fladi   Germany
Messages: 19
Registered: April 2011
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Hi!

I've seen some other forum where it works too. I have no doubt that it works in general. Perhaps you have an idea how I could debug the call to find out why it isn't working on my site.

The install I have was first installed with 3.0.1 and updated to 3.0.2 but I think there were no changes on this module?

thx
-Tim
Re: Aw: Re: Loading next message in tree-view with PATH_INFO theme [message #165108 is a reply to message #165107] Tue, 26 April 2011 10:37 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
Delete/rename your .htaccess file to see if it's Apache's fault.
Aw: Re: Aw: Re: Loading next message in tree-view with PATH_INFO theme [message #165109 is a reply to message #165108] Tue, 26 April 2011 12:22 Go to previous messageGo to next message
Fladi is currently offline  Fladi   Germany
Messages: 19
Registered: April 2011
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
No - same "error". I'll try to setup a blank install on another host and import the dump there to see if the problem moves with to the other host.

Any other suggestions?

Re: Aw: Re: Aw: Re: Loading next message in tree-view with PATH_INFO theme [message #165110 is a reply to message #165109] Wed, 27 April 2011 00:18 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
Also check the webserver's access.log to see if the URL is still valid after your rewrite rules are applied.
Aw: Re: Aw: Re: Aw: Re: Loading next message in tree-view with PATH_INFO theme [message #165111 is a reply to message #165110] Wed, 27 April 2011 00:55 Go to previous messageGo to next message
Fladi is currently offline  Fladi   Germany
Messages: 19
Registered: April 2011
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Yes, the url is still valid. No error.

I tried to follow the request within index.php. In the funktion &init_user there is a if-statement which decides if path_info is used?

	if ($o2 & 32768 && empty($_SERVER['PATH_INFO']) && !empty($_SERVER['ORIG_PATH_INFO'])) {
		$_SERVER['PATH_INFO'] = $_SERVER['ORIG_PATH_INFO'];
	}


If I comment out this the ajax-request goes fine. I'm not sure how this bit-thing with the fud-opitons is working.
FUD_OPT_2 (= $o2) is 1766232370 here.
For me it looks like the URL is treated as a path_info one instead of a "normal" one?

thx
Tim

Re: Aw: Re: Aw: Re: Aw: Re: Loading next message in tree-view with PATH_INFO theme [message #165112 is a reply to message #165111] Wed, 27 April 2011 01:13 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
May be this issue?
http://expressionengine.com/wiki/Workaround_for_Forced_Query_Strings/
icon14.gif  Aw: Re: Aw: Re: Aw: Re: Aw: Re: Loading next message in tree-view with PATH_INFO theme [message #165120 is a reply to message #165112] Wed, 27 April 2011 21:54 Go to previous messageGo to next message
Fladi is currently offline  Fladi   Germany
Messages: 19
Registered: April 2011
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Hi!

now it works as expected:

I changed line 18 in ./fuddata/src/users.inc.t to

$_SERVER['PATH_INFO'] = (isset($_SERVER['PATH_INFO'])) ? $_SERVER['PATH_INFO'] : @getenv('PATH_INFO');


Thanks for your support.

Re: Aw: Re: Aw: Re: Aw: Re: Aw: Re: Loading next message in tree-view with PATH_INFO theme [message #165122 is a reply to message #165120] Thu, 28 April 2011 00:18 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
Great news. Can you please test it as below before I commit it:
if ($o2 & 32768 && empty($_SERVER['PATH_INFO'])) {	// If USE_PATH_INFO, extract PATH_INFO.
	$_SERVER['PATH_INFO'] = @getenv('PATH_INFO');
	if (empty($_SERVER['PATH_INFO'])) {
		$_SERVER['PATH_INFO'] = (isset($_SERVER['ORIG_PATH_INFO'])) ? $_SERVER['ORIG_PATH_INFO'] : @getenv('ORIG_PATH_INFO');  
	}
}
Aw: Re: Aw: Re: Aw: Re: Aw: Re: Aw: Re: Loading next message in tree-view with PATH_INFO theme [message #165123 is a reply to message #165122] Thu, 28 April 2011 00:24 Go to previous messageGo to next message
Fladi is currently offline  Fladi   Germany
Messages: 19
Registered: April 2011
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
naudefj schrieb am Thu, 28 April 2011 00:18
Great news. Can you please test it as below before I commit it:


This one is not working.
Aw: Re: Aw: Re: Aw: Re: Aw: Re: Aw: Re: Loading next message in tree-view with PATH_INFO theme [message #165124 is a reply to message #165123] Thu, 28 April 2011 00:32 Go to previous message
Fladi is currently offline  Fladi   Germany
Messages: 19
Registered: April 2011
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
some more var_dump-info of $_SERVER['PATH_INFO'] when calling the ajax-request:

before the codebock: is NULL
after it's string(10) "/index.php"

with my code-block above it is:
before: NULL
after: bool(false)

[Updated on: Thu, 28 April 2011 00:33]

Report message to a moderator

Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: Postgresql
Next Topic: When idle in admin page...
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Oct 20 03:09:29 EDT 2017

Total time taken to generate the page: 0.00763 seconds