Jump to content

Request for app upgrades

Go to solution Solved by bfarber,

Recommended Posts

I ran into probably a very "use" case scenario here, but here are the details. 

I was updating my app names 2 avatar, since we aren't allowed to append columns to the core tables any longer, i decided to move the columns i was appending to core tables to their own table, and then do a join onto that table for \IPS\Members\Clubs, \IPS\downloads\File and \IPS\Member. however this is where i ran into my problem.

Since i had already had hooked these 3 classes in previous version of the app, the hooks were active at the time of an upgrade. however with how the hooking system works, the hook is eval'ed from the contents of the files found in applications/myapp/hooks/*.php. so there is the problem, on upgrade, the old files of the app are replaced with the new files (and new hooks) but the upgrade process has not ran yet, so my table had not been added and the try/catch that is added by \IPS\Plugin::addExceptionHandlingToHookFile(), doesn't catch the DB error that resulted from this, cause the query that was created was executed outside of the method (constructFromLoadQuery).  so this left my site broken (the front end 500 out and the ACP was in a login loop). no errors were being produce in system log or apache error log, so at first i wasn't sure what was causing the problem.  the problem did not present itself on a fresh install (as the hooks are registered after the db tables are added).


on upgrade of an application, could you make it where it disables the app (including its hooks) during an upgrade, or at least have a flag for the hook system that says "upgrade in process, do not use these hooks", or offer a different solution? 

Link to comment
Share on other sites

8 hours ago, BankFodder said:

it won't install manually because it is bigger than 2 MB

No idea about your plugin issue, yet the upload size issue is probably a limitation set in PHP.

Check your php.ini config for post_max_size and upload_max_size values and increase them as needed. Restart of php/web services will likely be required for the setting change to take effect.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...