MyBB Community Forums

Full Version: [MyAlerts] Guests can't comment
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Fatal error: Uncaught Error: Call to a member function getByCode() on boolean in /customers/a/4/e/ontic-philosophy.com/httpd.www/inc/plugins/myalerts.php:891 Stack trace: #0 /customers/a/4/e/ontic-philosophy.com/httpd.www/inc/class_plugins.php(139): myalerts_alert_post_threadauthor(Object(PostDataHandler)) #1 /customers/a/4/e/ontic-philosophy.com/httpd.www/inc/datahandlers/post.php(1078): pluginSystem->run_hooks(Array, Object(PostDataHandler)) #2 /customers/a/4/e/ontic-philosophy.com/httpd.www/newreply.php(518): PostDataHandler->insert_post() #3 {main} thrown in /customers/a/4/e/ontic-philosophy.com/httpd.www/inc/plugins/myalerts.php on line 891

I get this error message when a guest comments.

Here is line 891 of myalerts php:

889   if (!$post->data['savedraft']) {
890   /** @var MybbStuff_MyAlerts_Entity_AlertType $alertType */
891    $alertType = MybbStuff_MyAlerts_AlertTypeManager::getInstance()->getByCode('post_threadauthor');

139 of class_plugins.php

$return_args = $func($arguments);
 }

1078 of post.php

$plugins->run_hooks("datahandler_post_insert_post", $this);

518 of newreply.php

$postinfo = $posthandler->insert_post();
 $pid = $postinfo['pid'];
 $visible = $postinfo['visible'];
 $closed = $postinfo['closed'];

891 of myalerts.php

       $alertType = MybbStuff_MyAlerts_AlertTypeManager::getInstance()->getByCode('post_threadauthor');

Do I have to add any @ symbols or a 'return false' somewhere?

Clearly, the issue is with my alerts, maybe I should disable it and try commenting as a guest.

Yep, if I disabled myalerts, a guest can comment.

I will leave it disabled until hopefully one of the geniuses of mybb community forums can point me towards a fix! Big Grin

Is there a simple way to give guests a user ID?
are you using latest version of the plugin - which version number is shown on the plugin's page ?
MyAlerts (2.0.2)

It seems it is returning the error because the guests don't have a unique user ID and the loginbox prevents myalerts from working with guests, should I maybe remove the loginbox? Also, a plugin that assigns a unique ID and username for guests would be very useful.
Hi,

This is a known issue that I've been needing to fix for quite a while now. I'll hopefully get a chance to fix it soon.
Right okay, well I think I will reenable alerts, but if anyone else has any hack for this, it will be greatly appreciated and I will pay you with rep points that you can buy cookies with.

Could you also make it so that it is compatible with Tapatalk? Also, the developer of mentions needs to make their plugin compatible with Tapatalk too.
(2017-03-27, 07:45 PM)Nemus Wrote: [ -> ]Right okay, well I think I will reenable alerts, but if anyone else has any hack for this, it will be greatly appreciated and I will pay you with rep points that you can buy cookies with.

Could you also make it so that it is compatible with Tapatalk? Also, the developer of mentions needs to make their plugin compatible with Tapatalk too.

It's not a case of making MyAlerts compatible with Tapatalk, they need to make their plugin compatible with MyAlerts like they have for some others as far as I know. MyAlerts doesn't do anything particularly exotic really.
that was fixed and shared in myalerts thread by me.

And Tapatal have their own core so they have to write a plugin compat. It is a miracle works with mybb, but with many errors unfixed, slow rendering in all sites when are present and more, onky i can say tapatalk sucks in all senses on my oppinion.

But you have to contact to them for improvements due is a third party code not a part of mybb and is so far away than mybb...
Tapatalk is a pure evil... no update from their side, I contacted them many times (variable changes in Thank you/like system) but without any reply. I just disabled Tapatalk, add a mobile theme and my site loads much faster!
(2017-03-27, 10:12 PM)Dark Neo Wrote: [ -> ]that was fixed and shared in myalerts thread by me.

What was fixed? The problem in the OP?

I have been thinking of getting rid of Tapatalk, half of mycode doesn't work and mentions doesn't work, not to mention alerts and html5 mycode for videos.

I still would like an app version of my site though, one that delivers push notifications. I think I will look into that.
Try MentionMe instead of DVZ mentions
Pages: 1 2