Jump to content


Photo

Hook Issues


If I import a hook, the PHP files are exported as <original>_<random md5>.php to the hooks directory. But when I then try to edit the hook, the file names in the Files tab are still the original ones. Thus, when I save the hook, IP.Board will suddenly not find the PHP files anymore and the hook stops working.

This definitely happens in dev mode, not sure about normal mode.

Status: Not a Bug
Version: 3.3.2
Fixed In:


3 Comments

When working with IN_DEV mode enabled you need to rename the imported files in the hooks directory to their original name if you edit the hook from the ACP.

I'd like to change a bit how the whole import/export thing works while using IN_DEV but this is working as intended right now.
Even if this is intended I still think it should be changed. Editing any hook while in dev mode will most likely break it, with no warning or indication of what might have gone wrong. That's definitely not very user/dev-friendly.

On a related note - why doesn't IP.Board check whether the hook PHP files exist on save? This would catch this error, as well as a few other possible ones.


I'd like to change a bit how the whole import/export thing works while using IN_DEV but this is working as intended right now.

I can only quote what I've already said ;)