View Issue Details

IDProjectCategoryView StatusLast Update
0016847phplist applicationpluginspublic01-09-13 18:45
Reporterduncanc 
PrioritynormalSeveritymajorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version3.0.2 
Target Version3.0.XFixed in Version3.0.4 
Summary0016847: Plugin update failed due to caching
DescriptionWhen 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.
TagsNo tags attached.

Activities

There are no notes attached to this issue.