this is only occurring on my local server. i think it might be due to the function using a symfony function that optionally grabs info from the page headers and possibly my local server is not putting out the same headers as my remote server... however, i haven't noticed any significant differences between the content of the headers on each server yet.
anyone know?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- ura soul@tunist
ura soul - 0 likes
- ura soul@tunist
ura soul - 0 likes
- Matt Beckett@Beck24
Matt Beckett - 0 likes
- ura soul@tunist
ura soul - 0 likes
- Cim@manacim
Cim - 0 likes
- ura soul@tunist
ura soul - 0 likes
- Cim@manacim
Cim - 1 like
You must log in to post replies.anyone? ;)
i have resolved this by not using the current_page_url() function and instead using: $_SERVER[REQUEST_URI]
I've never had it not work, did you find out why it's not working?
i spoke too soon, the request_uri doesn't work either - i just thought it was because the behavior of my code changed by using it and i mis-interpreted the result.
no, i don't know why it's now working..
current_page_url() always returns the site's root address
$_SERVER[REQUEST_URI] returns nothing.
as i recall, the default from the symfony code that current_page_url() is using is to return the site root if nothing else worked.
Try this:
the problem was that $_SERVER['REQUEST_URL'] was not present at all. after comparing my nginx configuration on my local server to the remote server, i found that i had missed this line out:
after adding that in to the local config, all is well!
Oh that sneaky little parameter!