I am trying to find what causes the following which happens immediately upon uninstall of my updated subforum addon package:
After a while, the page return to normal. The above doesn't affect any other addon though, so I guess it is not a server fault.
I also couldn't detect any relevant error in apache error log file or system log file.
Could it be because I edited mysql database files via this addon? Any suggestion where should I look further into?
Just a guess, could it be an out of memory error? Are you running php fpm? You may try raising the php memory limit and restarting php.
The other thought is a timeout issue. If the first doesn't work try raising the execution timeout.
You mean just when you click on "unisntall"?
1.0 or 1.1?
1.0, just after clicking uninstall and while going back to action=admin;area=packages.
I was running fast cgi. It could be, I will check all that out.
Sorry for being pedantic, but... heh, I want to be sure. :P ;)
So you get it two times?
Repeating the steps:
1) enter admin > packages
2) click "uninstall package" next to the package
3) click "uninstall" button in the page that summarize the uninstall steps,
4) confirmation page the addon has been unisntalled
5) redirect to the packages list.
From your sentence I understand it happens just after 3 and 5.
Is that correct?
After step 4 uninstall confirmation button is clicked and going to step 5.
I already checked the execution time (1000) and memory limit (2048M), thus, I think they are not the causes.
My first thought was: while this addon restores database files to its original condition, deleted its own database files, and removes the hooks, the connection is somewhat / somewhere cut off, causing the above said error temporarily.
Unfortunately, testing the same on WAMP, the addon uninstalls just fine, no said error in continuous multiple installs and uninstalls.
Thus, I am coming back to my first thought or possibly, some server fault, on which the latter shows no clue, so far.
Wow! No, those shouldn't be problematic. Lol!
Would you like an install/uninstall test cycle on another server?
That would be great. The package I am testing is in this post:
http://www.elkarte.net/community/index.php?topic=2162.msg29377#msg29377
This package is already in used in http://elkarte.sch.my with one of its subforum http://x-mans.sch.my.
Installation worked perfectly. MultiTenancy Configuration displays in the Forum tab in the ACP.
(Link-4332) At this point I seem to be experiencing a bug: the package doesn't show in the ACP Package Manager.
(Link-4334)
Eh... that's strange?! The package is shown fine in my forum package browser. Is there any error logs?
Indeed there are.
Type of error: General
2: Parameter 1 to Tenancy::BufferUrl() expected to be a reference, value given
It's probably worth mentioning the server is running php7. ;)
O_o
I can't remember any Tenancy class in elk... maybe in some addon?
Woops. Sorry. I would assume that's a class in ahrasis' addon. :)
Ohh....
/me hides
You're too funny eman! Lol!
Thanks for offering help. ;)
It's my bad because first time I started using a buffer in smf, I think I remember it requires an ampersand before $buffer or otherwise it wouldn't work, so I wrongly thought that it could be related to elk integrate buffer code. The solution seems to remove the ampersand from (&$buffer). It is fixed, repacked and available in http://www.elkarte.net/community/index.php?topic=2162.msg29410#msg29410.
Question: I wonder why the others like (&$admin_areas) using integrate admin areas did not have this same affect on php 7?
Huhuhu... That's quite complicated to me to understand properly. In any event, thank you for the input.
Anyway,
@badmonkey, have you retested the newly packaged addon? Any error after the uninstallation?
Here is some information on the last package, if it's helpful in any way. The reason it didn't show in the installed list is because the file lost it's extension in the packages folder. Edited the filename to add .zip, and presto! It displayed as installed in the Package Manager. :)
Well....here is subsequent info. This may be a bug not at all related to MESFA or I made some mistake. Using the Download a package by url function in the PM yielded a file in the packages folder whose name reflected the url, but was not a viable file. That was the method used to install the package before. Not sure what significance, if any, that may hold.
As for the updated package, it installed without issue. As of yet there are no errors in the error log. Nice work ahrasis! How else may we help you? :)
As the topic is concerned, I need to test its uninstallation.
As of the possible bug, I haven't tested the download via url method.
Woops. Sorry, got on a tangent. The uninstall gave a blank page upon completing the process. But the uninstall process completed.
Here are the entries in the site directories error log:
[13-Nov-2016 10:47:05 America/New_York] PHP Notice: SSI.php was unable to load a session! This may cause problems with logout and other functions - please make sure SSI.php is included before *anything* else in all your scripts! in /public_html/SSI.php on line 219
[13-Nov-2016 10:47:05 America/New_York] PHP Warning: Cannot modify header information - headers already sent by (output started at /public_html/main.php:9) in /public_html/sources/Subs.php on line 2857
[13-Nov-2016 10:47:05 America/New_York] PHP Warning: Cannot modify header information - headers already sent by (output started at /public_html/main.php:9) in /public_html/sources/Subs.php on line 2858
[13-Nov-2016 10:47:05 America/New_York] PHP Warning: Cannot modify header information - headers already sent by (output started at /public_html/main.php:9) in /public_html/sources/Subs.php on line 2864
[13-Nov-2016 10:47:05 America/New_York] PHP Warning: Cannot modify header information - headers already sent by (output started at /public_html/main.php:9) in /public_html/sources/Subs.php on line 2873
[13-Nov-2016 10:48:17 America/New_York] PHP Fatal error: Uncaught Error: Call to undefined function MultiTenancy() in /public_html/sources/Load.php:1240
Stack trace:
#0 /public_html/index.php(186): loadTheme()
#1 /public_html/index.php(145): elk_main()
#2 {main}
thrown in /public_html/sources/Load.php on line 1240
So, the problem is "simply" that the function loadTheme is called
after the file Tenancy.subs.php has been removed, but
before the call to MultiTenancy is removed from Load.php... that is odd, but I guess it can happen.
It's a bit of a pain to fix actually, I see two ways to fix it:
1) wrap the function call with a check to see if the function exists,
2) convert the call to an hook-like structure.
1 would be something like:
// MultiTenancy theme change
if (function_exists('MultiTenancy'))
{
$id_theme = MultiTenancy('LoadTheme', $id_theme);
}
While 2 would require some changes, so I guess it's not worth. :P
Thank you very much.
As for number 2, I think I see that in
@inter FlarumStyle addon. I guess that is what you mean by a hook-like structure.
I think there is other occurrence of this MultiTenancy function that must be checked i.e. in index.php, and as such has made the necessary changes.
@badmonkey, can test the latest one in here: http://www.elkarte.net/community/index.php?topic=2162.msg29467#msg29467 ?
Absolutely! The install worked perfectly, as did the uninstall. No errors in the error log. Good work ahrasis! 8)