WoodiE
Well-known member
Thanks Rigel, I've done just that and it looks like all is good now.Yeah, this is an already reported unfixed issue.
You could just add your own robots.txt and not use the robots.php feature from the add-on until fixed.
Thanks Rigel, I've done just that and it looks like all is good now.Yeah, this is an already reported unfixed issue.
You could just add your own robots.txt and not use the robots.php feature from the add-on until fixed.
I had it turned off whilst awaiting an XF v1.3 compatible version, but previously working fine.Was the previous version working for you?
There are no changes around the logic for finding the directory to write to that I can see
Could you open the Cli.php file, and change
toCode:XenForo_Application::setDebugMode(false);
Code:XenForo_Application::setDebugMode(true);
And run again?
I had it turned off whilst awaiting an XF v1.3 compatible version, but previously working fine.
/admin.php?options/list/xenforo_sitemap | Sitemap directory is set to the default of "sitemap", so cannot see why it would be trying to target /root/sitemap/
It seems to be working fine for meWhen I run it independently via /admin.php?cron/ it works fine and creates/updates the files in sitemap/ directory.
So it works fine when run manually, but not when run via scheduled time. Definantly seems to be a coding issue?
Thanks.I'll take a look on hardening this to work on most setups. I might need to manually get the base directory of the installation in a similar way that the baseDir is taken for the Front Controller
May you help my problem about run cli ?There is a different workflow going on, since the scheduled task would probably run from deferred.php while running manually would go from the admin.php controller
I'll take a look on hardening this to work on most setups. I might need to manually get the base directory of the installation in a similar way that the baseDir is taken for the Front Controller
I changed and an error after run.
[root@xxx ~]# php /home/xxx/public_html/forum/library/XfAddOns/Sitemap/Cli.php
Running from directory: /home/xxx/public_html/forum
An exception occurred: xcache_get(): XCache var cache was not initialized properly. Check php log for actual reason in Zend/Cache/Backend/Xcache.php on line 95
#0 [internal function]: XenForo_Application::handlePhpError(2, 'xcache_get(): X...', '/home/xxx/p...', 95, Array)
#1 Zend/Cache/Backend/Xcache.php(95): xcache_get('xxx_data_op...')
#2 Zend/Cache/Core.php(303): Zend_Cache_Backend_Xcache->load('xxx_data_op...', false)
#3 XenForo/Model/DataRegistry.php(87): Zend_Cache_Core->load('data_options')
#4 XenForo/Dependencies/Abstract.php(144): XenForo_Model_DataRegistry->getMulti(Array)
#5 XfAddOns/Sitemap/Cli.php(36): XenForo_Dependencies_Abstract->preLoadData()
#6 {main}
My config.php xcache settings:
$config['cache'] = array(
'enabled' => true,
'frontend' => 'Core',
'frontendOptions' => array(
'caching' => true,
'automatic_serialization' => false,
'cache_id_prefix' => 'xxx_',
'lifetime' => 1800
),
'backend' => 'Xcache',
'backendOptions' => array(),
'cacheSessions' => true
);
I removed the server error log feature, because people kept complaining again and again that the add-on was giving them an error, to which I had to explain "that is not error, that is just a message saying it is successful"Never see anything in the server error log to indicate it is running, however the modification dates on the files indicate it is.
If the forum is not public (canView permissions for the registered group is revoked), it will be automatically skipped.@Rigel Kentaurus: Can you add an optiont to enter forum id to exclude them from sitemap?
I removed the server error log feature, because people kept complaining again and again that the add-on was giving them an error, to which I had to explain "that is not error, that is just a message saying it is successful"
Then XenForo in (1.2?) added a nag message in the AdminCP if there is anything in the Error Log, and that aggraviated the situation
So, it no longer does that. But, yes, the recent timestamp is an indicator that the sitemap is getting generated. It is mature enough anyway that I don't really require the error message anymore to debug things, it just works.
So, your cli.php doesnt work while enabled xcache on config.php ?I haven't yet been able to reproduce it, sadly. Definitely the XCache is the piece that is not being initialized / causing conflict.
Apparently not.So, your cli.php doesnt work while enabled xcache on config.php ?
<IfModule mod_rewrite.c>
RewriteEngine On
# If you are having problems with the rewrite rules, remove the "#" from the
# line that begins "RewriteBase" below. You will also have to change the path
# of the rewrite to reflect the path to your XenForo installation.
#RewriteBase /xenforo
# This line may be needed to enable WebDAV editing with PHP as a CGI.
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml) - [NC,L]
RewriteRule (robots\.txt)$ robots.php [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
I still get same error, can you please fix your cli.php script while xenforo enabled storage cache ?Apparently not.
I was using XCache myself for a while, but not for storage, that is untested.
If you manage to get it fixed, please share it with the rest of the thread, might be useful for somebody else.
We use essential cookies to make this site work, and optional cookies to enhance your experience.