MyBB Community Forums

Full Version: MyAlerts v2.0.4
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I don't know why, but this bug still exist for me in version 2.0.4: https://github.com/MyBBStuff/MyAlerts/issues/234

Edit: Nevermind, it was a bug for "quoted" alerts. I found the same bug for subscribed alerts.
Hello,

I have downloaded the MyAlerts plugin from the first post but I have hit a severe issue. When I throw the files into my FTP into the root location of my forum the Plugin list in ACP-> Plugins becomes blank (although I have several plugins activated and running normally).
I have managed to indentify the problem which was the inc\plugins\myalerts.php file and when I was poking around to see which lines cause this issue i have found out that commenting out those lines:
defined(

'MYBBSTUFF_CORE_PATH'

) or define('MYBBSTUFF_CORE_PATH', MYBB_ROOT . 'inc/plugins/MybbStuff/Core/');

define('MYALERTS_PLUGIN_PATH', MYBB_ROOT . 'inc/plugins/MybbStuff/MyAlerts');



defined(

'PLUGINLIBRARY'

) or define('PLUGINLIBRARY', MYBB_ROOT . 'inc/plugins/pluginlibrary.php');



require_once MYBBSTUFF_CORE_PATH . 'ClassLoader.php';



$classLoader = new MybbStuff_Core_ClassLoader();

$classLoader->registerNamespace(

'MybbStuff_MyAlerts',

array(MYALERTS_PLUGIN_PATH . '/src')

);

$classLoader->register();

Allows the plugin to show normally in the page and without the above mentioned issue present.
While poking around some more I managed to install it ( at least MyBB inserted the tables and columns) BUT the plugins list was blank again and the plugin did not seem to work at all...

Anyone ran into / had the same issue? Or knows how to fix it?

Versions:
MyBB Version - 1.8.22
PHP Version - 7.3.19
SQL Engine - MySQLi 5.7.23
^ have you added pluginlibrary.php & ClassLoader.php files ?
Yes, the Pluginlibrary is in the /inc/plugins and the ClassLoader is in the "inc/plugins/MybbStuff/Core/" directory.

That's how the Plugins page look after transferring the MyAlerts files(with the ClassLoader in the proper folder)

[Image: GAKy9P3.png]

Forgot to add. When going to Plugin Updates tab, the whole page just goes blank
^ can you check recent entries of server error log - there should be the clue !
Hello,

I have checked my forum folder and I do not have any error log unfortunately :/ Even though the settings are to use error handling, log errors, error type medium is set to Warning and Errors and the logging location is: ./error.log . Did I set something wrong?

Edit: I don't know if it is of any importance but the host is bluehost, and in the general (outside forum and public_html folders was an errorlog but nothing mentioning errors from forum :/
Do you also have a webserver log, for example in /var/log/nginx/?
Hmmm tried to find it on ftp but I dont seem to have those folders anywhere and even though I searched manually I can't find any webserver logs :/


Edit:
Well... I have managed to have it shown not by commenting those mentioned earlier lines:
defined(

'MYBBSTUFF_CORE_PATH'

) or define('MYBBSTUFF_CORE_PATH', MYBB_ROOT . 'inc/plugins/MybbStuff/Core/');

define('MYALERTS_PLUGIN_PATH', MYBB_ROOT . 'inc/plugins/MybbStuff/MyAlerts');



defined(

'PLUGINLIBRARY'

) or define('PLUGINLIBRARY', MYBB_ROOT . 'inc/plugins/pluginlibrary.php');



require_once MYBBSTUFF_CORE_PATH . 'ClassLoader.php';



$classLoader = new MybbStuff_Core_ClassLoader();

$classLoader->registerNamespace(

'MybbStuff_MyAlerts',

array(MYALERTS_PLUGIN_PATH . '/src')

);

$classLoader->register();
But by adding "$" in front of every MYBBSTUFF_CORE_PATH / MYALERTS_PLUGIN_PATH / PLUGINLIBRARY which was not in the defined/define syntax.
In Example, in the orignal code it was like:
require_once MYBBSTUFF_CORE_PATH . "ClassLoader.php";

And that's what I've done:
require_once $MYBBSTUFF_CORE_PATH . "ClassLoader.php";

Well I am afraid of trying to activate it as last time I had to manually delete the tables and clear the cache of activated plugins (as through Plugin Panel I could not due to the blank plugin list). So can anyone explain to me if it will break my forum again? or just go with it?

Edit2:
Well I have installed it, but when I try to activate it I get an error that plugin library is missing... (And yes I have it in the /inc/plugins location)

Edit3:
Code for initalising variables of pluginlibrary and checking the plugin library as of now:
defined(
	'PLUGINLIBRARY'
) or define('PLUGINLIBRARY', "./inc/plugins/pluginlibrary.php");
if (!file_exists($PLUGINLIBRARY)) {
		flash_message($lang->myalerts_pluginlibrary_missing, 'error');
		admin_redirect('index.php?module=config-plugins');
	}
Those $ should not be there. The code is correct as they are constants.

Please uninstall MyAlerts, delete the MyAlerts files,ClassLoader.php and pluginlibrary, reupload the original source, ClassLoader.php and pluginlibrary.php files correctly then try installing again.
Hello,

After removing the old files and clearing all leftover data, then pasting the fresh ones, I am back to square one:

[Image: hx9NUo7.png]