Resource icon

Custom Robots 1.1.4

No permission to download
@Liam W I understand and since I had no option I signed up on your site and downloaded this add-on (I still don't like the idea but it's your add-on and so your rules so it's OK). However it's not working on my XF 1.3.3 install when trying to identify Pingdom as a robot:
Code:
ErrorException: Undefined index: pingdom.com_bot_version_1.4_(http://www.pingdom.com/) - library/XenForo/Session.php:847
Generated By: Unknown Account, hace 2 minutos
#0 /var/www/html/forums/library/XenForo/Session.php(847): XenForo_Application::handlePhpError(8, 'Undefined index...', '/var/www/html/f...', 847, Array)
#1 /var/www/html/forums/library/XenForo/Session.php(343): XenForo_Session->getRobotId('Pingdom.com_bot...')
#2 /var/www/html/forums/library/XenForo/Session.php(257): XenForo_Session::getPublicSession(Object(Zend_Controller_Request_Http))
#3 /var/www/html/forums/library/XenForo/Controller.php(291): XenForo_Session::startPublicSession(Object(Zend_Controller_Request_Http))
#4 /var/www/html/forums/library/XenForo/Controller.php(304): XenForo_Controller->_setupSession('Index')
#5 /var/www/html/forums/library/XenForo/FrontController.php(346): XenForo_Controller->preDispatch('Index', 'XenForo_Control...')
#6 /var/www/html/forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#7 /var/www/html/forums/index.php(13): XenForo_FrontController->run()
#8 {main}
array(3) {
["url"] => string(33) "http://www.mysite.com/forums/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}

Could you please fix?

I'll look into it :)

Liam
 
@Liam W I understand and since I had no option I signed up on your site and downloaded this add-on (I still don't like the idea but it's your add-on and so your rules so it's OK). However it's not working on my XF 1.3.3 install when trying to identify Pingdom as a robot:
Code:
ErrorException: Undefined index: pingdom.com_bot_version_1.4_(http://www.pingdom.com/) - library/XenForo/Session.php:847
Generated By: Unknown Account, hace 2 minutos
#0 /var/www/html/forums/library/XenForo/Session.php(847): XenForo_Application::handlePhpError(8, 'Undefined index...', '/var/www/html/f...', 847, Array)
#1 /var/www/html/forums/library/XenForo/Session.php(343): XenForo_Session->getRobotId('Pingdom.com_bot...')
#2 /var/www/html/forums/library/XenForo/Session.php(257): XenForo_Session::getPublicSession(Object(Zend_Controller_Request_Http))
#3 /var/www/html/forums/library/XenForo/Controller.php(291): XenForo_Session::startPublicSession(Object(Zend_Controller_Request_Http))
#4 /var/www/html/forums/library/XenForo/Controller.php(304): XenForo_Controller->_setupSession('Index')
#5 /var/www/html/forums/library/XenForo/FrontController.php(346): XenForo_Controller->preDispatch('Index', 'XenForo_Control...')
#6 /var/www/html/forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#7 /var/www/html/forums/index.php(13): XenForo_FrontController->run()
#8 {main}
array(3) {
["url"] => string(33) "http://www.mysite.com/forums/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}

Could you please fix?

It's an issue with case - XenForo changes the user agent to lower case when checking for a match, however the key contains an upper case character causing the error.

Just a note, the user agent doesn't have to be a full string - it can be a substring, such as pingdom.com_bot

Liam
 
Is it safe to say that this add-on is harmless yet also not necessary?

Kinda of like kissing your sister?
 
Would someone be kind enough to explain how to utilize this?

Meaning I have it installed successfully. Now what? What do I do with the link from post #11 in this thread?


Thanks.
 
The screenshots in the resource are fairly self explanatory: https://xenforo.com/community/resources/custom-robots.3192/

Especially this one:
upload_2014-5-18_20-13-5-png.73905


Enter the details for each robot you want to define.
 
I just discovered using debug mode that it looks like your add-on is duplicating the same query on every page load. In other words you're running the same query two times.

Could you please confirm if it is a bug?
 
I just discovered using debug mode that it looks like your add-on is duplicating the same query on every page load. In other words you're running the same query two times.

Could you please confirm if it is a bug?

I'll take a look.

Liam
 
Thanks for the fix.

Now I got a question. Is it needed to run the query even when the person browsing the forum is a registered member? Afaik bots are always guests... this has been happening from the first version and I believe there is a reason for that but maybe it is a bug...
 
Thanks for the fix.

Now I got a question. Is it needed to run the query even when the person browsing the forum is a registered member? Afaik bots are always guests... this has been happening from the first version and I believe there is a reason for that but maybe it is a bug...

Because when the new bots are added to the system, there is no way to check if someone is logged in or not ;)

Liam
 
@kaieivindm

The substring should just be
Code:
AhrefsBot/5.0
- the XenForo system does a substring check on the full user agent.

Liam


Thanks! And if they are now as guests on my page, with adding this custom robot, it should be viewed as Robot instead?
Will this instant be updated if I refresh my "whos online now" page? Or do I have to wait for a new session from that bot?
 
Thanks! And if they are now as guests on my page, with adding this custom robot, it should be viewed as Robot instead?
Will this instant be updated if I refresh my "whos online now" page? Or do I have to wait for a new session from that bot?

All correct... Instant.
 
@Liam W

So I am having some issues with i.e Twitterbot.

From Xenforo
upload_2015-1-23_13-38-52.webp

From Twitter
upload_2015-1-23_13-39-29.webp

So we know the user-agent for the bot is Twitterbot.
And as you can see, this is what I use as well.

However the server logs says this:

ErrorException: Undefined index: twitterbot - library/XenForo/Session.php:877
Generert av: Ukjent konto, I går kl 23:19
Stack Trace
#0 /home/4/s/spillforumet/www/library/XenForo/Session.php(877): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/4/s/spill...', 877, Array)
#1 /home/4/s/spillforumet/www/library/XenForo/Session.php(350): XenForo_Session->getRobotId('Twitterbot/1.0')
#2 /home/4/s/spillforumet/www/library/XenForo/Session.php(257): XenForo_Session::getPublicSession(Object(Zend_Controller_Request_Http))
#3 /home/4/s/spillforumet/www/library/XenForo/Controller.php(291): XenForo_Session::startPublicSession(Object(Zend_Controller_Request_Http))
#4 /home/4/s/spillforumet/www/library/XenForo/Controller.php(304): XenForo_Controller->_setupSession('Index')
#5 /home/4/s/spillforumet/www/library/XenForo/FrontController.php(346): XenForo_Controller->preDispatch('Index', 'XenForo_Control...')
#6 /home/4/s/spillforumet/www/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#7 /home/4/s/spillforumet/www/index.php(13): XenForo_FrontController->run()
#8 {main}
Forespurt status
array(3) {
["url"] => string(84) "http://www.spillforumet.no/traad/halo-5-guardians-multiplayer-beta-desember-2014.71/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}

Is this something on my side? Something I can do to fix?
Or is it something else?
 
Back
Top Bottom