DISQUS

Patchlog: XML Sitemaps for Pligg

  • Pradeep Sethi · 2 years ago
    Hi

    I am trying this in 9.7 and am getting the following error:

    Fatal error: Unknown function: clear_cache() in /home/delhirea/public_html/delhirealestate/modules/xml_sitemaps/xml_sitemaps_install.php on line 5
  • Pradeep Sethi · 2 years ago
    I could install it after commenting that line. Thanks
  • Mihai Secasiu · 2 years ago
    I guess they removed or renamed that function. That was useful only when you enable/re enable the module. So you should be fine without it. Maybe just delete everything in the cache/ folder after you enable the module.
  • Jody D · 2 years ago
    Hey there, great tools, have one question though: I installed and activated the module but when I looked at the sitemap http://www.ebenta.com/module.php?module=xml_sit..., i found out that the date shown was invalid. I am getting c on it. What is wrong with the installation? Is this by default the settings? How can I correct it to show the right date format (sample: 2005-02-21T18:00:15+00:00)? Any help is appreciated.

    Here is the url of my sitemap: http://www.ebenta.com/module.php?module=xml_sit...

    Thanks.
  • Mihai Secasiu · 2 years ago

    The problem is the php version that you use. Most likely you have php 4.x.

    The module uses the date function with the "c" format, which was added in php 5 .


    So either switch to php 5 or modify the module, and replace date("c" with something like date("Y-m-dTH:i:s" ...


    Switching to php 5 is recommended since the php development team will drop support for php 4 soon

  • Jody D · 2 years ago
    Great! I figured it out. I am running 4.x. Fixed it. Thanks!
  • Guy · 2 years ago
    Looks great! I ran into a couple of problems:
    1. It looks like it's already been figured out: PHP5 is required
    2. xml_sitemaps_main.php:Line 88 should change UNIX_TIMESTAMPT to UNIX_TIMESTAMP
    3. xml_sitemaps_install.php:Line 22 should change ^sitemap-([0-9]+).xml to ^sitemap-([a-zA-Z0-9]+).xml
    4. Categories aren't being escaped to their safe names. I have some categories with ampersands (&) that don't display when following the sitemap link
    5. The site's URLMethod configuration is being ignored. I'm using URLMethod 1 (non-clean URLS), but the sitemap generated uses clean URLs
  • Mihai Secasiu · 2 years ago
    thanks for the feedback. I'll release a fix soon. If you have a patch feel free to submit it.
  • dhirendra patel · 2 years ago
    Hi

    I am trying this in 9.7 and am getting the following error:

    Fatal error: Unknown function: clear_cache() in /home/delhirea/public_html/delhirealestate/modules/xml_sitemaps/xml_sitemaps_install.php on line 5
  • Mihai Secasiu · 2 years ago
    It would be a good idea to read the other comments before you post...someone may have found a fix...
  • Daniel · 2 years ago
    I am getting the following error when I go to my sitemap, is there a way to fix this ?



    Warning
    : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select link_modified from linka_links where link_status!='disca in
    /home/nzweblink/linka/libs/db.php
    on line
    207





    http://www.linka.co.nz/module.php?module=xml_si...

    1970-01-01T12:00:00+12:00



    http://www.linka.co.nz/sitemap-pages.xml
  • Mihai Secasiu · 2 years ago

    It may be a problem with your php configuration options. Maybe you have magic_quotes_gpc enabled and the data may get double escaped...

    It would help if you could echo that sql before the error so that we have the whole sql query too look at and debug.

  • Daniel · 2 years ago
    How do you mean "it would help if you could echo that sql before the error", sorry I don't understand.

    Click here to go to the page where the error is
  • Mihai Secasiu · 2 years ago
    look xml_sitemaps_main.php, at line 17 there should be this:
    $sql = "SELECT count(*) FROM ".table_links." WHERE link_status!='discard'";
    look in the database and see if the link_status field exists...
    try to run this query :
    select link_modified from linka_links where link_status!='discard'
    in phpmyadmin or the mysql client manually and see what result you get ...
  • Daniel · 2 years ago
    when I run the sql query: SELECT link_modified FROM linka_links WHERE link_status != 'discard'

    The result shows link_modified with a number below eg (20070712192533), running the query returns a normal result with no errors

    The link_status field does exist
  • Mihai Secasiu · 2 years ago
    Did you check that line ( 17 ) in xml_sitemaps_main.php ?
    How does it look ?
  • Daniel · 2 years ago
    This is how it looks:

    $sql = "SELECT count(*) FROM ".table_links." WHERE link_status!='discard'";
  • Raj · 2 years ago
    Please tell me solution for this error

    Warning
    : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'XmlSitemaps_Links_per_sitemap ) l' at line 1 in
    /home/tagrin/public_html/libs/db.php
    on line
    233
  • Mihai Secasiu · 2 years ago
    Have you modified this the module in any way? What php and mysql version do you you run?
  • Raj · 2 years ago
    No i havent modified anything... iam using php 4.4 and mysql 4
  • Mihai Secasiu · 2 years ago
    It was reported before that this module has some problems on php 4 and this may be one of your problems. I also haven't tested this on mysql 4 so that may be the other problem.
  • Guy · 2 years ago
    This is a PHP 4 thing. You need to use PHP 5, but the MySQL version should be okay.
  • Daniel · 2 years ago
    Hi Mihai,

    I still haven't figuered out why I am getting the error I am from the above comments by me "Daniel 2007-09-06 07:17:51"
  • Raj · 2 years ago
    Why dont you release for php 4. I think most of people use version 4.
  • Mihai Secasiu · 2 years ago
    I don't currently have a host running php 4. And you should really upgrade anywany. The php development team announced a few months ago that they will drop support for php 4.
  • Mihai Secasiu · 2 years ago

    @Daniel : Are you running php 4?

    some other reported it's not working on php 4 so you may have the same problem too.

  • Travel Voter · 2 years ago
    http://travelvoter.com/module.php?module=xml_si...
    This works very well with 9.8.
    Thanks!

    P.S. We couldn't get the friendly sitemap url.
  • Mihai Secasiu · 2 years ago
    you have to use the htaccess rules I described in this post.
    Also you might want to upgrade to php5 or stay tuned for an update of this plugin that may make this work on php 4 ( the last mod date doesn't work on php 4 )
  • dario · 2 years ago
    Your sitemap doesn't, and mine doesn't; i'm using pligg 9.81, and using php 5
  • Mihai Secasiu · 2 years ago
    My sitemap doesn't do laundry either....
    anyway thanks for the great detailed feedback :)
  • Nissa · 2 years ago
    Hi mihai..
    I cant install your sitemap module. What i do is: extract .tar file and upload to root modules folder. And i go to admin and Module Management. But the xml_sitemaps not show there. For your information i use pligg 9.8. its rite the step what i do?
  • Mihai Secasiu · 2 years ago
    this problem may be related with the call to clear_cache function in xml_sitemaps_install.php. Editing that file and removing that call should let you install the module
  • Nissa · 2 years ago
    Many thank Mihai.. Your sitemap great working now. i just delete clear_cache in xml_sitemaps_install.php. Btw after install... did i must/need to add again clear_cache in xml_sitemaps_install.php ?
  • jatboy · 2 years ago
    Has anyone made it work on 9.8.2? I don't even see it in the Available Modules.
  • hostmenow · 2 years ago
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'XmlSitemaps_Links_per_sitemap ) l' at line 1 in


    This error I am getting . Please tell me how can i rectify this . The php version is proper . Is it due to my sql version or what .

    Also as the number of postings are more than 5000 in case multiple files are created do we have to give write permissions in some files or what.
  • Amit · 2 years ago
    Getting an error:

    Fatal error: Call to undefined function clear_cache() in /home/desitoob/public_html/modules/xml_sitemaps/xml_sitemaps_install.php on line 5

    Using Pigg v9.8

    Let me know. Thanks.
  • wwwoliondorcom · 2 years ago
    Sorry, me again, because I got 2 errors on Google sitemap.


    I have enabled clean sitemap url and given this sitemap address to Google sitemap:
    http://www.MY-WEBSITE.com/sitemapindex.xml



    at http://www.MY-WEBSITE.com/sitemapindex.xml I have





    http://www.MY-WEBSITE.com/sitemap-0.xml
    2007-10-27T13:34:02-07:00



    http://www.MY-WEBSITE.com/sitemap-pages.xml







    The errors on Google sitemap are:

    http://www.MY-WEBSITE.com/sitemap-0.xml
    Nested indexing
    This URL refers to a Sitemap index, not a Sitemap. Please remove it and resubmit.

    http://www.MY-WEBSITE.com/sitemap-pages.xml
    Nested indexing
    This URL refers to a Sitemap index, not a Sitemap. Please remove it and resubmit.


    Please tell me if you see what is the problem.

    Thanks.
  • Isaac · 2 years ago
    Go to line 5 of the file and remove clear_cache(). As easy as 1,2,3.
  • hemant · 2 years ago
    Hi
    I get this error:

    Fatal error: Call to undefined function: clear_cache() in /home/content/r/u/b/ruberr2002/html/modules/xml_sitemaps/xml_sitemaps_install.php on line 5

    Please advise
  • hemant · 2 years ago
    I run 9.6 pligg & get this message:
    Fatal error: Call to undefined function: clear_cache() in /home/content/r/u/b/ruberr2002/html/modules/xml_sitemaps/xml_sitemaps_install.php on line 5

    Please advise. Thanks
  • Digispro · 2 years ago
    Hi,

    I'm not getting an empty sitemap.

    Here is the url

    http://www.awomanis.com/awi/module.php?module=x...

    I think I'm not doing something right.
  • Thomas Herold · 2 years ago
    I am new to this. I have uploaded and extracted the folder inside the module folder, however it does not show up in my admin control panel.

    Can you help me out?

    Thomas
  • Nick · 1 year ago
    Can you us some best practice thoughts on the number of links per sitemap? I have over 100,000 articles, and I want to index them all, is 50,000 a good number?
  • Nick · 1 year ago
    Ohh, and did I mention how awesome this is? I was working on something similar to this all morning, and then I found your module, and saved me time. Thanks for the awesome mod, and the support!
  • Albert Matthews · 1 year ago
    Thank you ever so much Isaac,

    Seems to be a popular problem that onebut i read thru and go to your post and done what you said and bame all done and installed thanks

    great advice and thanks
    Mihai Secasiu PatchLog.com


    Warmest regards
    Albert F A Matthews
  • Albert F A Matthews · 1 year ago
    To what you wrote ok you have not set up the sitemap in the admin section
    Goto
    Pligg beta 9 Home » Admin » Configure Pligg Beta 9
    and if you do this it will remove all of the sql database problems like

    Warning
    : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘XmlSitemaps_Links_per_sitemap ) l’ at line 1 in
    /home/tagrin/public_html/libs/db.php
    on line
    233


    just a head up and im using the new one out Pligg_Beta_9.8.2

    hope this helps,
    Albert F A Matthews
    www.wedigg.co.uk
  • zorba33 · 1 year ago
    Hello,

    Everything is ok , xmlsitemap is running on my 9.8.2 pligg website.

    The only problem is that the sitemap I get is empty.

    Can you help?

    BR
  • zorba33 · 1 year ago
    hello,


    I am getting an empty sitemap.
    http://88.191.13.182/module.php?module=xml_site...

    Can you help?
  • Nick · 1 year ago
    Hey BR,

    It looks like in the config you are using friendly URLs. Take off the friendly URLs and see if it works that way, chances are its working great. There are some mods that you need to do to make friendly URL's work. but it all works perfectly. Its an awesome mod.
  • DR · 1 year ago
    Anyone know something about this error?

    Warning: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select link_modified from pligg_links where link_status!='disca in /homepages/28/d123456/htdocs/homepages/domain/libs/db.php on line 207
  • albert matthews · 1 year ago
    where can i get a working XML Sitemaps that works 9.9

    i had the other one but, im not sure if the old one is working ??

    help "" advise ""
  • anil · 1 year ago
    Gr8 module..i really love 2 use it but only a prob i am facing is
    http://www.jeqq.com/sitemap-pages.xml

    error with only ths help any help guys
  • Andres · 1 year ago
    If you are looking to use it on 9.9.0:

    http://forums.pligg.com/pligg-modules/10571-xml...
  • whatnwhen · 1 year ago
    http://www.whatnwhen.in/sitemapindex.xml


    I am getting only 2 urls and thats two....don't know from where its pulling, can you help on this please.......
  • DevCore · 1 year ago
    I have got PHP5 installed, but either way this module has this error:

    Fatal error: Call to undefined function clear_cache() in /home/_______/public_html/modules/xml_sitemaps/xml_sitemaps_install.php on line 5

    I am running Pligg's latest version.
  • Mihai Secasiu · 1 year ago
    just remove line 5 in xml_sitemaps_install.php
  • Designx9 · 1 year ago
    Please tell me whether my sitemap is correct or not.
    i have submitted to google without errors but no page is indexed by google.
    I am using URLMETHOD2 and copied the rewrite URLS to .htaccess.
    Please help me out.

    Thanks in advance
  • Mihai Secasiu · 1 year ago
    Your sitemap is correct. Just because you sent the sitemap to google it doesn't mean your pages will be instantly indexed.
  • designx9 · 1 year ago
    Not a problem Mihai.
    thanks for your response.
  • adeel · 1 year ago
    404 not found with my xml map http://www.webforinfo.com/sitemapindex.xml i have followed all instruction even remove pligg and then install again.
  • Mihai Secasiu · 1 year ago
    for this to work you need to have certain rewrite rules set up. The examples for apache are in the module configuration. My guess is you didn't set them or there's something wrong with the way you set them.
  • adeel · 1 year ago
    only sitemap show here http://www.webforinfo.com/module.php?module=xml...
    even i have changed my site url method with value 2
    also google accept this sitemap url
    i don't know it will harm my site or not according to the seo.
  • Gevaldigg · 1 year ago
    Hi Mihai, Thanks for what I expect will be a great module. Unfortunately, I'm getting the exact same results as adeel. You can see mine here http://www.gevaldigg.com/module.php?module=xml_... .
    I'm not a programmer but I can usually understand how to make minor tweaks to my site like this. What is the final sitemap supposed to look like? domain.com/sitemap.xml ???
    Thanks in advance for you help
  • Mihai Secasiu · 1 year ago
    Make sure mod_rewrite in .htacces or virtual hosts configuration works first. If you managed to have pligg friendly urls work then this should work too.
    Look into the module's configuration it explains clearely what you have to put into .htaccess to have a nice looking sitemap.
    The final sitemap is actually a sitemap index ( this is the one that ou'll be sending to the SEs ) and it should be http://www.gevaldigg.com/sitemapindex.xml
    Good luck.