View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0016847||phplist application||plugins||public||24-08-13 16:55||01-09-13 17:45|
|Priority||normal||Severity||major||Reproducibility||have not tried|
|Target Version||3.0.X||Fixed in Version||3.0.4|
|Summary||0016847: Plugin update failed due to caching|
|Description||When updating a plugin using the update button on the plugin page, I kept getting the message "Plugin installation failed" even though the plugin zip file could be manually downloaded from GitHub.|
Looking into the problem showed a few issues:
the function fetchUrl() is used to get the zip file. This function seems to cache the retrieved content in the urlcache table or the global $urlcache. This doesn't seem correct for the case of retrieving a plugin file. The file should always be retrieved.
When the retrieved content is stored in the urlcache table, the definition of the content column, long text,is incompatible with holding a binary file such as a zip file. In the two cases that I looked at, the zip file content had been truncated in the table. It was this truncated content that was causing the 'Plugin installation failed' message, due to a badly-formed zip file.
After replacing fetchUrl() with the php function file_get_contents(), I could reliably update the plugins.
|Tags||No tags attached.|