Closed (fixed)
Project:
Context
Version:
6.x-2.0-beta7
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Oct 2009 at 10:10 UTC
Updated:
10 Apr 2010 at 01:12 UTC
A fresh install of context 6.x-2.0-beta7 cannot import it's own exports. The problem is the import performed roughly as eval "return {$import}";, however the $import string does not contain a trailing semicolon, so eval crashes out.
The attached patch is a simple fix, perhaps overly simple :-).
| Comment | File | Size | Author |
|---|---|---|---|
| context_ui.admin_.inc_.import-fix.patch | 734 bytes | James Andres |
Comments
Comment #1
dixon_I can confirm that the patch fixes the problem.
Comment #2
vgarvardt commentedPatch does not work or me either.
I get the following error records in log n import:
- Invalid argument supplied for foreach() in /home/besttrav/public_html/includes/common.inc on line 914.
- strtr() [function.strtr]: The second argument is not an array in /home/besttrav/public_html/includes/common.inc on line 931.
Comment #3
steven jones commentedThanks for the patch James, I've made it so that the single export produces valid PHP, and that the import adds a semi-colon as per your patch. Hopefully that'll make things a little easier for everyone.
Comment #5
fearlsgroove commentedissue in #2 still exists --- I can't successfully import anything in 2.0-beta7
Comment #6
steven jones commentedIt's fixed in the dev versions of context 2, and will be released in 6.x-2.8
Comment #7
fearlsgroove commentedI was using 2.x from CVS and it's not fixed, but it's also not the same issue. See: #584672: Error on Import: stdClass::__set_state()