Page 1 of 2

Plugin repository

Posted: Thu May 28, 2020 9:41 pm
by Tata
I have built locally a webpage with almost all available plugins. Some of them needed adjustment to work with v.1.7.2.
Now the administration of almost all plugins is accessible. Anyway, some of the plugins work not as expected or donät work at all.
More heads means more knowledge. So I have uploaded the website to http://cmsimple.sk/plugins-172. If you are interested, have a look evt. write me for the password.
Any comment/advise is appreciated.

Re: Plugin repository

Posted: Tue Jun 02, 2020 11:03 pm
by Tata
After reviewwin installed plugins, I also reviewed and completed SK translation to all installed plugins.
I have found however, that the pdfviewer doesn't work. It either loads only the viewer and no file in it or returns the warning about failed writing in tmp file. The Gallery collection also shows some problems.
If you are interested, you may download language files from the page.

Re: Plugin repository

Posted: Wed Jun 10, 2020 7:20 pm
by mhz
If I write the name of the working plugin "imgrotator" into the search field, this will happen:
Fatal error: Cannot declare class Mobile_Detect, because the name is already in use in /www/c/m/u13296/public_html/plugins-172/plugins/shariff/lib/Mobile_Detect.php on line 28
Cannot declare class Mobile_Detect, because the name is already in use in /www/c/m/u13296/public_html/plugins-172/plugins/shariff/lib/Mobile_Detect.php on line 28
And it also happens with other names.

Re: Plugin repository

Posted: Wed Jun 10, 2020 7:29 pm
by Tata
Well, I haven't tested the search function. All plugins are sorted alphabetically and categoriezed by the author. So the search function is not necessary. I also can't say, what the message does mean. Will see, what I find.
But, anyway, thanks for the announce.
EDIT:
It seems to me that theere is something redundant in shariff plugin. And that's something I doubt to find, as I don't understand fully the plugin.
Also - one more time - not all plugins are fully compatible either with CMSimple_XH v1.7.2 or with all PHP versions. Right now I am testing them with PHP 7.3.9 and 7.4.2.

Re: Plugin repository

Posted: Wed Jun 10, 2020 8:18 pm
by mhz
What do you mean with " the pdfviewer doesn't work"?
https://tutor-test.cmsimplexh.de/?neue-Plugins
Here it works. The only thing is the small iframe window. Click on the right side at > and there on the button "Präsentationsmodus".
I have the version 1.0.0
PHP 7.4 does not work or I get the announcement :Bad Gateway 502

Re: Plugin repository

Posted: Wed Jun 10, 2020 8:33 pm
by Tata
Yes, it works already. With PHP v7.4.x, there are more serious problems.
See here: viewtopic.php?f=10&t=13307&p=75783&hilit=php+7.4#p75788

Re: Plugin repository

Posted: Thu Jun 11, 2020 9:01 am
by dsteuer
Thank you for the effort!
I find this an incredibly useful resource!

Detlef

Re: Plugin repository

Posted: Thu Jun 11, 2020 12:03 pm
by cmb
mhz wrote:
Wed Jun 10, 2020 7:20 pm
If I write the name of the working plugin "imgrotator" into the search field, this will happen:
Fatal error: Cannot declare class Mobile_Detect, because the name is already in use in /www/c/m/u13296/public_html/plugins-172/plugins/shariff/lib/Mobile_Detect.php on line 28
Cannot declare class Mobile_Detect, because the name is already in use in /www/c/m/u13296/public_html/plugins-172/plugins/shariff/lib/Mobile_Detect.php on line 28
And it also happens with other names.
The problem is that both cmsimplemobile and shariff use the same class Mobile_Detect, but both ship it as separate file. Both plugins appear to properly handle the file inclusion for themselves, but they are not compatible with each other.

A quick fix might be to replace the following line in plugins/shariff/index.php (there are two occurences):

Code: Select all

    require_once ($pth['folder']['plugins'] . 'shariff/lib/Mobile_Detect.php');
with

Code: Select all

if (!class_exists('Mobile_Detect', false)) {
    require_once ($pth['folder']['plugins'] . 'shariff/lib/Mobile_Detect.php');
}
So if Mobile_Detect is alreay loaded by cmsimplemobile, shariff won't attempt to load it, but rather to use cmsimplemobile's class instead.

A better (albeit not perfect) solution would be that both plugins actually rely on autoloading; i.e. place Mobile_Detect.php in plugins/cmsimplemobile/classes/ and plugins/shariff/classes/, and to not explicitly require_once the file.

Maybe even better, both plugins could place the Mobile_Detect class in their own namespace.

PS: oh! Autoloading requires namespacing anyway.

Re: Plugin repository

Posted: Fri Jun 12, 2020 9:13 am
by Tata
cmb wrote:
Thu Jun 11, 2020 12:03 pm
A quick fix might be to replace the following line in plugins/shariff/index.php (there are two occurences):

Code: Select all

    require_once ($pth['folder']['plugins'] . 'shariff/lib/Mobile_Detect.php');
with

Code: Select all

if (!class_exists('Mobile_Detect', false)) {
    require_once ($pth['folder']['plugins'] . 'shariff/lib/Mobile_Detect.php');
}
This works perfectly. THX.

Re: Plugin repository

Posted: Fri Jun 12, 2020 3:44 pm
by Tata
TEST: comments von jerry
Am localhost:
Warning: include_once(/Users/msereday/testhost/plugins/comments/languages/en.php): failed to open stream: No such file or directory in /Users/msereday/testhost/plugins-172/plugins/comments/libs/add-comment.php on line 14

Warning: include_once(): Failed opening '/Users/msereday/testhost/plugins/comments/languages/en.php' for inclusion (include_path='.:/Applications/MAMP/bin/php/php7.3.9/lib/php') in /Users/msereday/testhost/plugins-172/plugins/comments/libs/add-comment.php on line 14

Warning: include_once(/Users/msereday/testhost/plugins/comments/config/config.php): failed to open stream: No such file or directory in /Users/msereday/testhost/plugins-172/plugins/comments/libs/add-comment.php on line 15

Warning: include_once(): Failed opening '/Users/msereday/testhost/plugins/comments/config/config.php' for inclusion (include_path='.:/Applications/MAMP/bin/php/php7.3.9/lib/php') in /Users/msereday/testhost/plugins-172/plugins/comments/libs/add-comment.php on line 15

Notice: Undefined variable: plugin_cf in /Users/msereday/testhost/plugins-172/plugins/comments/libs/add-comment.php on line 19

Notice: date_default_timezone_set(): Timezone ID '' is invalid in /Users/msereday/testhost/plugins-172/plugins/comments/libs/add-comment.php on line 19

Notice: Undefined variable: plugin_cf in /Users/msereday/testhost/plugins-172/plugins/comments/libs/add-comment.php on line 20

Warning: time() expects exactly 0 parameters, 1 given in /Users/msereday/testhost/plugins-172/plugins/comments/libs/add-comment.php on line 20

Notice: Undefined variable: plugin_cf in /Users/msereday/testhost/plugins-172/plugins/comments/libs/add-comment.php on line 29

Notice: Undefined variable: plugin_cf in /Users/msereday/testhost/plugins-172/plugins/comments/libs/add-comment.php on line 45

Notice: Undefined variable: plugin_tx in /Users/msereday/testhost/plugins-172/plugins/comments/libs/add-comment.php on line 53
Das gleiche am HostServer. Da fehlt der Ordner, wo die Installation steht. Am Localhost sollte es lauten z.B.:
/Users/msereday/testhost/plugins-172/plugins/comments/config/config.php