Support » Plugin: Strictly Google Sitemap » [Plugin: Strictly Google Sitemap] wp in a subfolder

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Strictly Software


    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?

    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


    Plugin Author Strictly Software


    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;

    >>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:

    WP sits in:
    Visitors see site at root:

    Here is the output from the debug:

    replace rootpath: /home/rugbylea/public_html/ with site url: 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: xslurl: sitemap fullpath: /home/rugbylea/public_html/sitemap.xml

    Plugin Author Strictly Software


    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.

    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

    Plugin Author Strictly Software


    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.


    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.

    Plugin Author Strictly Software


    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


    Plugin Author Strictly Software


    Did this work?

    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.

    Plugin Author Strictly Software


    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 and not to the value you require it to be which seems to be

    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.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Plugin: Strictly Google Sitemap] wp in a subfolder’ is closed to new replies.