ElkArte Community

Elk Development => Bug Reports => Topic started by: Antechinus on March 08, 2017, 03:09:42 pm

Title: Parse error when unistalling mod (bear with me here)
Post by: Antechinus on March 08, 2017, 03:09:42 pm
No, this is not the usual n00b "you edited the file after installing the mod, stupid".

Story is that the non-working Topic Tags mod that Ema made :D has two file deletions as part of its uninstall script.

These two files exist, and exist on the paths indicated by the mod's coding. So, when it comes to uninstalling they should just be deleted. It's a simple require file/delete file thing that doesn't depend on the details of the file's PHP. As long as the path is correct it should work.

It doesn't work. :P

What happens is this:
Title: Re: Parse error when unistalling mod (bear with me here)
Post by: Spuds on March 08, 2017, 03:42:24 pm
That is an old package-info file syntax

$themedir must be changed to THEMEDIR
$languagedir must be changed to LANGUAGEDIR

Title: Re: Parse error when unistalling mod (bear with me here)
Post by: emanuele on March 08, 2017, 03:46:28 pm
The $languagedir in the addon is broken because it should be LANGUAGEDIR/english so that's not a bug in Elk, but in the addon.
/me blames the addon writer.
Even though, the install/uninstall should work anyway... I think.

The $themedire is odd, because in theory it should be fine, and seems fine for the css/js files, but it's broken for the php. I'm almost tempted to blame the addon author again for some iditioc bug he wrote, but maybe there is something. Dunno.
Title: Re: Parse error when unistalling mod (bear with me here)
Post by: Antechinus on March 08, 2017, 03:53:36 pm
So when you say $themedir should work in theory, I assume that means it really should be THEMEDIR  anyway.

Question: why the change to CAPSLOCK for paths?
Title: Re: Parse error when unistalling mod (bear with me here)
Post by: emanuele on March 08, 2017, 04:22:52 pm
Quote from: Antechinus – So when you say $themedir should work in theory, I assume that means it really should be THEMEDIR  anyway.
No, it should work as $themedir (not sure why it is still there though lol).

Quote from: Antechinus – Question: why the change to CAPSLOCK for paths?
Directories are constants and the convention in php is that constant names are all uppercase.
Title: Re: Parse error when unistalling mod (bear with me here)
Post by: Antechinus on March 08, 2017, 04:25:51 pm
Ok, fair enough on the convention.

Anyway it doesn't work as $themedir. Not that it's a problem for uninstalling this package (I can get around that) but it sounds like you have some sort of Elkish buglet running around.