History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: OX-5098
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: andrew.hill
Reporter: Miguel Correa
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
OpenX Ad Server

openXDeliveryLimitations plugins is not upgraded when upgrading from 2.7.25-beta to 2.7.30-beta-rc12

Created: 13/Mar/09 05:21 PM   Updated: 18/Mar/09 12:40 PM
Component/s: OXP: Installation & Upgrade System, OXP: Plugins
Affects Version/s: OpenX 2.7.30-beta
Fix Version/s: OpenX 2.7.30-beta, Milestone 29
Security Level: Public (All users can see these issues)

Time Tracking:
Original Estimate: Not Specified
Remaining Estimate: 0h
Time Spent - 3h
Time Spent: 3h
Time Spent - 3h

Issue Links:

 Description  « Hide
When upgrading from OpenX 2.7.25-beta to OpenX 2.7.30-beta-rc12 openXDeliveryLimitations plugin is not upgraded, it reports
Failed (Parse error, server returned invalid response)

I've been investigating this issue and it's failing because during the upgrade the function _includeComponentFile (Component.php) is including the file Browser.class.php and Browser.class.php is requiring a class in a wrong path. This class is '/lib/phpSniff/phpSniff.class.php'.

 All   Comments   Work Log   Change History   FishEye   Crucible   Builds      Sort Order: Ascending order - Click to sort in descending order
Chris Nutting - 16/Mar/09 05:52 PM - edited
This error is caused by a number of things all going wrong together... the main bug is that the deliveryLimitations plugin includes files which used to be core.

The parse error is generated because the imported file tries to include a file that doesn't exist (due to the path changes I believe) which causes a PHP fatal error.

Generally, include_once'ing should be used wherever possible in plugins since this will generate a suppressable warning rather than an unsuppressable fatal error if the specified file can't be included.

This issue was actually caused by OX-4185 - The plugin that's currently installed assumes (and require_once's) the phpSniff.class.php file from core, whereas the file has now been moved into the plugin itself.

I think I'm going to have to add some code to the PluginImporter class to create an empty zero-byte file in lib/phpSniff/phpSniff.class.php if upgrading the deliveryLimitations plugin... hopefully I can make it version specific.... so the file goes away in subsequent upgrades

Chris Nutting - 16/Mar/09 06:28 PM
So... this could be done, we could make the PluginImporter add the "MAX_PATH . '/lib/phpSniff/phpSniff.class.php'" file to the file list to be copied over from the previous install, but that would require the "/lib" folder to be writable, which we don't want.

Another possibility that I'm looking at is post-processing the file after copying it up, so that the require line is commented out, allowing the plugin to be correctly upgraded...

Chris Nutting - 16/Mar/09 07:41 PM
Fixed in 2.7.30-beta-rc13

(Will be up-ported to the 2.7.31 branch this afternoon)