Support » Plugin: Google XML Sitemaps » Swedish characters in url

Viewing 15 replies - 1 through 15 (of 16 total)
  • It’s called a “umlaut” represented in html as ä or ä.

    Anyway it sounds like your PHP is not set to the correct character set to handle this special character. So I believe you need to convert the character to ISO-8859-1.

    If you are comfortable with coding jump into this plugin’s main php file and use preg_replace(“/ä/”,chr(138),$string). The output should be a true umlaut.

    Thanks Kellogg9,
    but I can’t find any main php file for the plugin. It could be “xml-sitemap-xml-sitemapcouk/xmls.php” but then I don’t know where in the file I should put your code.

    In the file I found this in two locations: $sitemap = ‘<?xml version=”1.0″ encoding=”UTF-8″?>

    Sure, i can help you….i will look into the fix myself directly in the source code when i have time later today.

    Just realized since your domain is an IDN (Internationalized Domain Name) it will need to be PunyCode’ed. Punycode is a encoding syntax by which a Unicode (UTF-8) string of characters can be translated into the basic ASCII-characters permitted in network host names (you do this via: idn_to_ascii(“www.bä”); ). For example, although you see the umlaut, underneath (and in your website’s source code i see your domain is: A few more questions:

    1. Can you provide the exact error message?

    2. You mention: “In the detected path for the file there is a black question mark“. Was this error in your error_log file or where exactly are you seeing this?

    2. Is the problem occurring when PHP attempts to write out the sitemap.xml file whereby inside said file an XML node(s) line is attempting to prepend your host url: http://www.bä to your article page locations?

    3. Is the path directory of your site inside a directory called bä So the directory literally shows an umlaut?

    We may need to try a few things since i have never quite worked with IDNs before but am very curious to get this to work.

    Thanks for any extra info.

    I change the time limit for php to 20. And this is the message that stays forever:
    The building process might still be active! Reload the page in a few seconds and check if something has changed.
    The last run didn’t finish! Maybe you can raise the memory or time limit for PHP scripts.

    This is how it looks in the setting page:
    Filename of the sitemap file
    Detected Path: E:\B�
    Detected URL:

    Yes, it appears in the error log also:
    [APP_POOL_ID] => b�
    and here:
    [DOCUMENT_ROOT] => E:\\B�
    [SCRIPT_FILENAME] => E:\\B�\\wp-admin\\options-general.php
    [APPL_PHYSICAL_PATH] => E:\\B�\\
    and here:
    [PATH_TRANSLATED] => E:\\B�\\wp-admin\\options-general.php

    sometimes it spells correct in the error log:
    [SERVER_NAME] =>

    I use this url in WordPress Address (URL) and Site Address (URL):

    Hmmmm…the “?” may just be a visual display problem (so not important) since it appears your site isnt having problems accessing those files (it knows where they are).

    Curious….in your error_log file in your root directory (so not what you see in the settings page but inside an actual file called error_log — u will need to use a file manager to get access to it e.g. ftp) do you see a line that begins with “PHP Notice: MySQL” (or any line that uses the word “MySQL” in it)?

    ALSO can you click the debug function link (on the settings page) and scroll down to “Build Process Results” (located near the bottom of the page). Do you see any variable line that is empty or set to 0?

    I ask because as I look through the plugin source code it appears the only real way for it to give the error you are getting is via the _endTime variable being equal to 0 which only happens if an error occurred; and the only place that can happen is when it starts accessing your database.

    I am also getting curious about your server side php.ini configuration for running processes (i.e., max_execution_time) or mySQL’s time limits. I will look into that later.

    I can’t find any error_log fil in the root directory. It’s a windows server and I find it difficult to touch it. Do you mean the error log that comes from XML Sitemap Generator?

    Can’t find any “Build Process Results”, the debug function ends with “Errors, Warnings, Notices” and there is nothing there.

    Ahhh…that’s interesting. Seems there is a php fatal/exception error occurring because u should see “Build Process Results” (and a lined called “MySQL Queries”). So you are on a Windows server? Ok. I will look around for way to check up where their error logs are located. In the mean time, if u have a cpanel thing (or a user friendly gui offered by your web hoster) which you can look around for places that might indicate your server errors that will be helpful.

    Well at least i narrowed down where the error in code is happening. Might be a conflict with your domain and mySQL because this plugin forgot to encode it or something.

    I might need to give you a temporarily modified sitemap-core.php file (that is where all the work for this plugin is done) which dumps out very simple debug lines so i know how far it gets before dying..that way we can narrow what is going. At least that way we dont need to hunt around for an error_log file (if any) — i’ll just make my own that at least tells me where it is dying.

    I cant be fully sure where things fall apart…just hunches.

    I can’t find any error log newer then 121229 – even after I retried to make a new xml sitemap.

    Ok i did a very crude change to sitemap-core.php that includes a simple call to MY_LOG(..) that writes out lines like “1”, “2”, and so on (doesnt write out any other info). Here is the changed file:

    Can you rename your existing sitemap-core.php file and put the above file in its place and then try to rebuild your sitemap?

    What it will do is write out a file called “@MY_LOG.txt” in both the root and wp-admin area of your website. So then i should be able to access it via: http://www.bä … when we are done then you can delete this txt file and replace your sitemap-core.php file back to its original.

    Just in case you are wonddeirng here is the function i put in:

    function MY_LOG($data)
     file_put_contents("@MY_LOG.txt",$data."<br />",FILE_APPEND);
    file_put_contents($_SERVER['DOCUMENT_ROOT']."/@MY_LOG.txt",$data."<br />",FILE_APPEND);

    Notice it writes out two files. I wasnt sure if your site would have issues using $_SERVER[‘DOCUMENT_ROOT’] so i decided to use two file_put_contents() calls as a backup so i can either access the file from the root and if that didnt work then i can access the file via: http://www.bä (assuming you kept the default plugin name the same).

    My bad…i had a bug in the code…i updated the link above.

    I deactivated the plugin, change name of the files, reactivated it. When I go the the setting page a totally new page shows up, with suggestion to download “sitemap-core.php”

    Oh, that’s unique. Well, you can do what i did by way of getting it to work like normal (so put back the original file and making sure it is fine) and just replacing it with my file…so without deactivating the plugin. That way it doesnt realize it has been changed. Works for me.

    I am heading out to do some shopping — i am a girl after all 😛 so i will be back in 3 hrs time.

    I tried many different ways but I always get this page with suggestion to download “sitemap-core.php”

    It’s late here in Malta. Good night!

    Oh so that is the problem…

    Just to make sure we are on the right wavelength…

    1. You need to download the actual file that is hosted at that third party link i gave. So click the URL i give above and then click where it says “Download: sitemap-core.php” (the area above the 5 stars). This will download the actual sitemap-core.php file to your computer.

    2. Open up your server and go into the plugins folder for google-sitemap-generator.

    3. Rename the sitemap-core.php file you see in that folder to org-sitemap-core.php

    4. Upload the file that you downloaded form step #1 into this plugin folder.

    5. Now go into your WordPress admin panel and click to rebuild the sitemap

    Okay, the two files show up where you told them to be.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Swedish characters in url’ is closed to new replies.