Update to admin marketplace/installer.php#14709
Conversation
I changed an xml file and changed its extension to ocmod.zip and went to install. Thereafter, every time I attempted to load the extension installer page, I was greeted with a PHP unauthorised zip file error and the page just wouldn't load. This update checks for errors with the zip files, if there's an error it will delete the file and continue through the loop without crashing the page
|
What for |
|
Sorry, you're right. I was logging the error on the screen, then I wanted to portray the message to the user on the installer page, but I haven't figured out how to display the message yet - I deleted the print code, do you think I should remove $ZIP_ERROR as well? |
|
Well. Anyway your code is not finished and does nothing except silent deleting zip files. I do not think it should be merged. It does not fix anything. I would prefer to see an error in the log and my files preserved rather than deleted without explanation. |
|
Well, it does do something. It got the installer page loading again and removes the offending file that crashes it. I agree the error needs to be logged, it's just setting up the warning in the admin panel after the fact - any suggestions? |
Added extra fields for the English language requirements of the installer update
Added in the extra fields required for the French language options in the installer update
Moved the validation from the getList function to the upload function to prevent the file from being uploaded to the server and crashing the page if there's an error. It now also displays an error message, with English and French translations, to the end user if the file can't be uploaded,
|
Okay, I think I got it. I shifted it to the upload function, so it now checks the temporary file before storing it to the server. If there's an error that wasn't previously picked up, it'll display an error message to the end user during the upload process |
|
looks like this is requiried. could be loads of reasons the files go corrupt |
I created an xml file and changed its extension to ocmod.zip and went to install. Thereafter, every time I attempted to load the extension installer page, I was greeted with a PHP unauthorised zip file error and the page just wouldn't load. This update checks for errors with the zip files, if there's an error it will delete the file and continue through the loop without crashing the page