Skip to main content
Topic: If anyone can answer... (Read 6611 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: If anyone can answer...

Reply #15

You're too funny eman!  Lol! 

Thanks for offering help.  ;)

Re: If anyone can answer...

Reply #16

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?

Re: If anyone can answer...

Reply #17

ob_start (that is the function called when the output buffer is manipulated) has always worked that way.
The pass-by-reference (&) is used in the "internal" (let's call them that way) cases where you have to modify the value passed to the hook. The reason is very seldom only a single parameter is passed to call_integration_hook (or Hooks::hook), most of the times multiple parameters are passed (and some of them are not supposed to be changed), so it would be difficult to "decide" what to expect as a return value.
Bugs creator.
Features destroyer.
Template killer.

Re: If anyone can answer...

Reply #18

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?

Re: If anyone can answer...

Reply #19

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.  :)
Last Edit: November 12, 2016, 10:59:23 pm by badmonkey

Re: If anyone can answer...

Reply #20

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?  :)

Re: If anyone can answer...

Reply #21

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.

 

Re: If anyone can answer...

Reply #22

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:

Code: [Select]

[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


Re: If anyone can answer...

Reply #23

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:
Code: [Select]
	// 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
Bugs creator.
Features destroyer.
Template killer.

Re: If anyone can answer...

Reply #24

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.


Re: If anyone can answer...

Reply #26

Absolutely!  The install worked perfectly, as did the uninstall.  No errors in the error log.  Good work ahrasis!   8)