Strictly Google Sitemap
wp in a subfolder (13 posts)

  1. babrees
    Posted 5 years ago #

    Thought I would give this plugin a try as my other script is currently broken.

    Unfortunately Strictly doesn't appear to like it when WP is in a subfolder.

    Whilst my previous script would base the sitemap on the actual site, strictly bases it on the subfolder.
    ie http://mysitedomain.com/wpsubfolder/file
    instead of

  2. Strictly Software
    Plugin Author

    Posted 5 years ago #

    So you changed the location of the sitemap in the admin section by changing the "Main Sitemap Options" e.g the URL and Path to reflect this and it still doesn't work?

  3. babrees
    Posted 5 years ago #

    Hi, and thanks for the reply

    Sorry, admit I missed that! I have now set that correctly and rebuilt the sitemap. It produced the sitemap.xml ok and in the root, however, when I click on the sitemap link in the admin area it tells me

    "Error loading stylesheet: A network error occurred loading an XSLT stylesheet:

    From this message it has added the sub folder where WP is twice. I can't see where this can be corrected in the plugin admin area


  4. Strictly Software
    Plugin Author

    Posted 5 years ago #

    So you set the Sitemap path value to be the path to your subfolder?

    Can you provide me with details of all the values you have saved for those fields e.g Sitemap path, URL and name.

    Also provide details of your folder structure and if you can add some debug to the constructor in the sitemap class and let me have the output then I might be able to help you e.g

    add the echo in between these 2 lines (line 163 in the class file)

    $this->rootpath = StrictlyTools::GetHomePath();

    echo "replace rootpath: " . $this->rootpath . "
    with site url: " . $this->siteurl . " in plugin path: " . $this->pluginpath . "


    $this->pluginurl = str_replace($this->rootpath,$this->siteurl,$this->pluginpath);

    and then on 190

    // set up the actual paths by joining together specified directory + sitemap name

    echo "pluginpath: " .$this->pluginpath . "
    rootpath: " . $this->rootpath . "
    plugin url: " . $this->pluginurl . "
    xslurl: " . $this->xslurl . "
    sitemap fullpath: " . $this->sitemap_fullpath;

  5. babrees
    Posted 5 years ago #

    >>So you set the Sitemap path value to be the path to your subfolder?<<

    no, the values are set to the root

    Sitemap Fielane: sitemap.xml
    Sitemap Path: /home/accountname/public_html/
    Sitemap URL: http://www.mydomain.org.uk

    WP sits in: http://www.mydomain.org.uk/subfolder/
    Visitors see site at root: http://www.mydomain.org.uk

    Here is the output from the debug:

    replace rootpath: /home/rugbylea/public_html/ with site url: http://www.rugbyleagueshirt.org.uk/jillyblog/ in plugin path: /home/rugbylea/public_html/jillyblog/wp-content/plugins/strictly-google-sitemap/ pluginpath: /home/rugbylea/public_html/jillyblog/wp-content/plugins/strictly-google-sitemap/ rootpath: /home/rugbylea/public_html/ plugin url: http://www.rugbyleagueshirt.org.uk/jillyblog/jillyblog/wp-content/plugins/strictly-google-sitemap/ xslurl: http://www.rugbyleagueshirt.org.uk/jillyblog/jillyblog/wp-content/plugins/strictly-google-sitemap/sitemap.xsl sitemap fullpath: /home/rugbylea/public_html/sitemap.xml

  6. Strictly Software
    Plugin Author

    Posted 5 years ago #

    Do you want try the new version I just put up 1.0.6 as I have replaced the custom function I was using to calculate the plugin URL with the wordpress function plugin_dir_url and this should give the correct path to the plugin and then to all the XSL files which are causing you problems.

    Let me know if you have any problems.

  7. babrees
    Posted 5 years ago #

    thanks. It now works, but not in the way that is required. The links in the sitemap are to the folder where WP resides, they should point to the root

  8. Strictly Software
    Plugin Author

    Posted 5 years ago #

    I am a bit confused. Which links are you talking about? Links to the articles and categories that are contained within the sitemap or links to files that the sitemap uses e.g to the XSLT?

    I am not sure how your site is setup to work or what you need the sitemap to do so can you please provide full details with examples please including physical and virtual paths of every important factor.


  9. babrees
    Posted 5 years ago #

    looking at the site map it has made you see

    http://mydomain/wpdirectory/filename instead of

    However, I did just try the hyperlink and it did go to the latter.

    I also see that the items in the sitemap are not in chronilogical order, whilst maps made by other scripts are.

  10. Strictly Software
    Plugin Author

    Posted 5 years ago #

    All the links to the files are based on the wordpress setting called siteurl which (from your debug) is returning


    therefore all the pages, articles etc within the site "jillyblog" will appear under that.

    Try outputting the following 3 wordpress variables
    e.g add this code to the constructor in the sitemap class file

    echo "siteurl = " . get_option("siteurl") . "
    blogurl = " . get_option("blogurl") . "
    home = " . get_option("home");

    If you get a value for "blogurl" which is


    and not


    then change the line of code in the constructor from

    $this->clean_siteurl = StrictlyPlugin::untrailingslashit(StrictlyPlugin::get_option('siteurl'));

    to this

    $this->clean_siteurl = StrictlyPlugin::untrailingslashit(StrictlyPlugin::get_option('blogurl'));

    I am not sure on the difference between these two values but I am using siteurl because on my own system blogurl returns a blank value.

    Let me know if that works and please send the output of the debug


  11. Strictly Software
    Plugin Author

    Posted 5 years ago #

    Did this work?

  12. babrees
    Posted 5 years ago #

    TBH I had given up as, whilst I really appreciate people like yourself who provide the plugins, I just don't have the time or experience to start modifying or experimenting with code.

    However, in appreciation of your work I have just tried this and had to change the line you mention. Unfortunately this breaks the admin area of WP; going to the settings for strictly google sitemap I get a blank page and the left nav dropdowns do not work.

  13. Strictly Software
    Plugin Author

    Posted 5 years ago #

    Thats a shame as its really hard to fix someones bug when
    a) its on a server you don't have access to and
    b) you cannot replicate it yourself.

    It seems that for some reason your wordpress system has the value set for one of the configuration values (siteurl) to http://www.rugbyleagueshirt.org.uk/jillyblog and not to the value you require it to be which seems to be http://www.rugbyleagueshirt.org.uk

    As I said before I don't really know what the difference between these two is and on my own systems (4 sites) the blogurl value is blank whereas the siteurl isnt. I thought maybe the blogurl setting might work for you but the code I gave you shouldn't have caused any real errors unless you missed off a semicolon or something.

    echo "siteurl = " . get_option("siteurl") . "
    blogurl = " . get_option("blogurl") . "
    home = " . get_option("home");

    The other solution that I can think of is to update the siteurl value in your config to be the correct setting. I don't know if this would affect anything else in your system or not and its hard to know without playing around with your code or reading up some more so don't go changing anything without knowing what the repercussions are.

    These links might explain it a bit more


    If I come up with a new version to enter a specific path for the site/blog to override the default values I will post a message here.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Strictly Google Sitemap
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic