XML Sitemap for XenForo 1.3 [Not needed, included in 1.4]

Hello if i check "Include all pages in a forum" & "Include all pages in a thread" I get this error. How i can fix it?

Code:
Server Error
 
Undefined variable: totalPages
 
XenForo_Application::handlePhpError() in CemZoo/Sitemap/Helper/ThreadPagination.php at line 76
CemZoo_Sitemap_Helper_ThreadPagination->generate() in CemZoo/Sitemap/Index.php at line 165
CemZoo_Sitemap_Index->generateThreadsPagination() in CemZoo/Sitemap/Index.php at line 77
CemZoo_Sitemap_Index->generate() in CemZoo/Sitemap/CronEntry/RebuildSitemap.php at line 26
CemZoo_Sitemap_CronEntry_RebuildSitemap::run()
call_user_func() in XenForo/Model/Cron.php at line 356
XenForo_Model_Cron->runEntry() in XenForo/ControllerAdmin/Cron.php at line 204
XenForo_ControllerAdmin_Cron->actionRun() in XenForo/FrontController.php at line 310
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /var/www/admin/data/www/mysite.com/admin.php at line 13
 
That seems like a minor bugs, provided by the fact that you have no threads with more than 1 page :) Looks like an edge case I didn't consider.
I just updated the resource with a new version that fixes this issue.
 
can you add a option to not include threads from certain forums ?
It already excludes the private forums. If you want a forum not to be considered just deny viewing permissions to guest.
If you want single threads in a forum to be excluded, that is an option I would not be adding. I suggest adding that to your robots.txt instead
 
Seem to get an error when I run this...currently running 1.1.1...

Fatal error: func_get_args(): Can't be used as a function parameter in public_html/forums/library/XenForo/Error.php on line 193

Any clues?? :D

Cheers
Paul
Most likely your php version. Nothing to be done about that.
That is only called at the end to log the error, though, so if your sitemap is correctly generated in the sitemap/ directory you can ignore that
 
Most likely your php version. Nothing to be done about that.
That is only called at the end to log the error, though, so if your sitemap is correctly generated in the sitemap/ directory you can ignore that

Rigel,

Nothing is generated at all unfortunately .... running PHP 5.2.6 here....

Paul
 
Ok - switched off debug mode... now i get this...

Code:
Server Error
 
curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set
 
XenForo_Application::handlePhpError() in XfAddOns/Sitemap/Helper/Ping.php at line 29
XfAddOns_Sitemap_Helper_Ping::pingUrl() in XfAddOns/Sitemap/Helper/Ping.php at line 47
XfAddOns_Sitemap_Helper_Ping::pingGoogle() in XfAddOns/Sitemap/Index.php at line 133
XfAddOns_Sitemap_Index->pingServices() in XfAddOns/Sitemap/Index.php at line 93
XfAddOns_Sitemap_Index->generate() in XfAddOns/Sitemap/CronEntry/RebuildSitemap.php at line 26
XfAddOns_Sitemap_CronEntry_RebuildSitemap::run() in XenForo/Model/Cron.php at line 356
XenForo_Model_Cron->runEntry() in XenForo/ControllerAdmin/Cron.php at line 204
XenForo_ControllerAdmin_Cron->actionRun() in XenForo/FrontController.php at line 310
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /var/sites/p/*********.com/public_html/forums/admin.php at line 13

This is also after upgrading to 1.1.2

I think this one doesnt like me ;)
Paul

EDIT - just noticed i have the ability to switch between php 5.2 and php 5.3 on my cloud server. Changing to 5.3 fixes the above....however as soon as i enable Debug mode it comes back again, even on php 5.3... :(
 
Ok - switched off debug mode... now i get this...

Code:
Server Error
 
curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set
 
XenForo_Application::handlePhpError() in XfAddOns/Sitemap/Helper/Ping.php at line 29
XfAddOns_Sitemap_Helper_Ping::pingUrl() in XfAddOns/Sitemap/Helper/Ping.php at line 47
XfAddOns_Sitemap_Helper_Ping::pingGoogle() in XfAddOns/Sitemap/Index.php at line 133
XfAddOns_Sitemap_Index->pingServices() in XfAddOns/Sitemap/Index.php at line 93
XfAddOns_Sitemap_Index->generate() in XfAddOns/Sitemap/CronEntry/RebuildSitemap.php at line 26
XfAddOns_Sitemap_CronEntry_RebuildSitemap::run() in XenForo/Model/Cron.php at line 356
XenForo_Model_Cron->runEntry() in XenForo/ControllerAdmin/Cron.php at line 204
XenForo_ControllerAdmin_Cron->actionRun() in XenForo/FrontController.php at line 310
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /var/sites/p/*********.com/public_html/forums/admin.php at line 13

This is also after upgrading to 1.1.2

I think this one doesnt like me ;)
Paul

EDIT - just noticed i have the ability to switch between php 5.2 and php 5.3 on my cloud server. Changing to 5.3 fixes the above....however as soon as i enable Debug mode it comes back again, even on php 5.3... :(
If you disable the "ping Google and Bing" feature through the options, it will not give you the CURL error
Your server setup seems a little restricted
 
It already excludes the private forums. If you want a forum not to be considered just deny viewing permissions to guest.
If you want single threads in a forum to be excluded, that is an option I would not be adding. I suggest adding that to your robots.txt instead
i want search engines to index it, so cant use robots.txt

but those forums are not a priority, so instead of adding them in sitemap; i would let Google naturally index them
 
Times out for me, so I'm gonna try and run with a crontab script, but first need to build for CLI support.

I see it called XfAddOns_Sitemap_CronEntry_RebuildSitemap::run(). So hopefully my script can simply initiate the helper classes and then call run() and it will work.
 
Times out for me, so I'm gonna try and run with a crontab script, but first need to build for CLI support.

I see it called XfAddOns_Sitemap_CronEntry_RebuildSitemap::run(). So hopefully my script can simply initiate the helper classes and then call run() and it will work.
How big is your site? Even with 1M posts I don't seem to have a problem.

I could probably call set_time_limit from the script itself assuming you are not running in safe mode.
 
O. If your passing with 1M posts. I have to have another problem elsewhere. Its gotta be something else. Back to the drawing board.

Thanks
 
Times out for me, so I'm gonna try and run with a crontab script, but first need to build for CLI support.

I see it called XfAddOns_Sitemap_CronEntry_RebuildSitemap::run(). So hopefully my script can simply initiate the helper classes and then call run() and it will work.
I added a small Cli utility that will let you run it through the command line. Since it not only depend on the forum size but the php settings Cli might be better for some people.

Download & install the new package, and from your XenForo dir you can call Cli.php from the command line (i.e.)

PHP:
$ php library/XfAddOns/Sitemap/Cli.php

For everybody else please note this is completely optional. The task runs as a cron as usual.
 
For everybody else please note this is completely optional. The task runs as a cron as usual.

Finally end up running it. After about 20 minutes, I figured something was up. This error was in the admin server log about 20,000 times. (If this is a configuration problem, my bad)

Code:
Exception: -- Starting at 69 and page 2 and generating 10000 urls... - /home/miuiandroid/public_html/community/library/XenForo/Error.php:193
Generated By: Unknown Account, Today at 5:05 AM
Stack Trace
#0 /home/miuiandroid/public_html/community/library/XfAddOns/Sitemap/Index.php(157): XenForo_Error::debug('-- Starting at ...')
#1 /home/miuiandroid/public_html/community/library/XfAddOns/Sitemap/Index.php(80): XfAddOns_Sitemap_Index->generateForumsPagination()
#2 /home/miuiandroid/public_html/community/library/XfAddOns/Sitemap/CronEntry/RebuildSitemap.php(30): XfAddOns_Sitemap_Index->generate()
#3 /home/miuiandroid/public_html/community/library/XfAddOns/Sitemap/Cli.php(29): XfAddOns_Sitemap_CronEntry_RebuildSitemap::run()
#4 {main}
 
Problem here version of XF 1.1 and Sitemap 1.1.2B


Code:
Server Error
 
Undefined index: forumsPagination
 
XenForo_Application::handlePhpError() in XfAddOns/Sitemap/Index.php at line 78
XfAddOns_Sitemap_Index->generate() in XfAddOns/Sitemap/CronEntry/RebuildSitemap.php at line 30
XfAddOns_Sitemap_CronEntry_RebuildSitemap::run()
call_user_func() in XenForo/Model/Cron.php at line 356
XenForo_Model_Cron->runEntry() in XenForo/ControllerAdmin/Cron.php at line 204
XenForo_ControllerAdmin_Cron->actionRun() in XenForo/FrontController.php at line 310
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /home/tg/public_html/tgforos/admin.php at line 13
 
Top Bottom