samtiria / nextgen-gallery

Automatically exported from code.google.com/p/nextgen-gallery
0 stars 0 forks source link

Change in r938 from site_url() to home_url() causing issues with static front page #387

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What version of the product are you using? On what operating system?
1.8.2 in Wordpress 3.2.1

Please provide any additional information below.

Not sure why it's necessary to switch from home_url() vs. site_url() as they 
should both work (although site_url() should work all the time as it is the WP 
core).  Per WordPress' setup instructions for installing WordPress in it's own 
directory (http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory), the 
user needs to "COPY (NOT MOVE!)" the index.php to the new location (see item 
#7).

However, if you want to stay with home_url() for your admin AJAX base queries, 
could you please consider using 1. home_url('/index.php') or 2. home_url() . 
'/' . 'index.php' like /trunk/nggallery.php or 3. change the lastXhr variable 
to use s.domain + '/index.php' to specify the index.php file specifically as 
some installations may have a static index.html (or default.html on IIS) page 
for their home page that is not part of WordPress (out of my hands).

Thanks and keep up the great work!

p.s. sorry about the r965 comment.  I'm new to Google code bug tracking (used 
to Trac) and was really just meaning to send you a private comment on r938 
(instead of opening a bug ticket), not to make a big deal and display the 
comment to everyone and show up in the commit timeline

Original issue reported on code.google.com by sidthed...@gmail.com on 14 Jul 2011 at 8:18

GoogleCodeExporter commented 8 years ago
See also r821, what have you defined as home & site url ?

Original comment by alex.cologne on 14 Jul 2011 at 8:20

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I'm mainly talking about r938 for issues related to /trunk/admin/album.php and 
/trunk/admin/tinymce/window.php.  All of the other changes with home_url() 
(including r821) include "index.php" in their paths except for these 2 files.

Basically, what it comes down to is I have www.mysite.com and have WP installed 
at www.mysite.com/blog/.  I have home_url() (Site Address) set as 
www.mysite.com and site_url() (WordPress Address) as www.mysite.com/blog/.  
Both locations have the WP core file 'index.php' (with modifications to the one 
at the root pointing the include to the WP core file).  This is set up so that 
the custom post type pages I have set up will have a similar URL structure to 
the standard "blog post" home page.  However, in addition on this particular 
site, the owner wants access to a static 'index.html' file located at the root. 
 I have set up WordPress to have a "Static Front Page" in the Reading settings, 
pointing the Front Page to a WordPress page that never shows up (a fake 
placeholder page) and the Posts Page pointing to a Blog page (/blog/).

This leaves us with a site structure like so:
www.mysite.com
 -> index.html (default index file)
 -> index.php (WordPress redirect file - the "Static Front Page" within WordPress is never shown and is pointing to a "fake", placeholder WordPress page)
 -> /blog/ (WP core file installation directory and location for the Posts Page)

So, the way 1.8.2 is currently coded, the AJAX $GET URL from window.php (the 
NGGallery popup window from tinymce) when clicking on the dropdown/autocomplete 
of any of the tabs is calling something like:
http://www.mysite.com/?method=autocomplete&type=gallery&format=json&callback=jso
n&limit=50&term=
which is referencing the static 'index.html' file instead of:
http://www.mysite.com/index.php?method=autocomplete&type=gallery&format=json&cal
lback=json&limit=50&term=
which references the index.php file

Original comment by sidthed...@gmail.com on 14 Jul 2011 at 8:42

GoogleCodeExporter commented 8 years ago
Ok, sounds logic. Will look into this... Thanks for the good explanation

Original comment by alex.cologne on 14 Jul 2011 at 8:47

GoogleCodeExporter commented 8 years ago
Fixed with r966. Thanks for pointing this out

Original comment by alex.cologne on 16 Jul 2011 at 12:57