Closed (fixed)
Project:
Linkit
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Feb 2015 at 14:53 UTC
Updated:
19 Nov 2015 at 22:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
anonMake sure you run the update.php to update the database changes.
Comment #2
anonComment #3
robbertnl commented@#1 I did, but in the end was it my own PEBKAC. I assume i was confused somewhere with different servers.
Comment #4
robbertnl commentedComment #5
robbertnl commentedStill experiencing issues, special when trying to disable the imce plugin (disabled because private files are not supported at the moment ) for linkit. Does sometimes generate the error from this issue
Comment #6
punch commentedAfter update to 3.3 I am get this warning when edit an existing profile:
Warning: Invalid argument supplied for foreach() i form_type_checkboxes_value() (linje 2337 af xxx/drupal/xxx/includes/form.inc).
and when I try to save:
An illegal choice has been detected. Please contact the site administrator.
Comment #7
knalstaaf commentedHaving the same error as described in #6.
Update.php is run, chaches are cleared. This also occurs in the current dev-version.
Comment #8
knalstaaf commentedI've added an export of my config it case it may be of any convenience when reproducing. It's the only Linkit-config I'm having.
Comment #9
knalstaaf commentedSorry, that was the wrong one. The right one is attached to this post.
Comment #10
ashalan commentedIt looks like the update hook
on this issue was trying to set the url-type under the entity:file array in the linkit_profiles table. However it replaced the entire entity:file array with a string rather than just the url-type. So attempting to save existing profiles flags errors as a result of that faulty data. Can someone confirm that this error is coming from that update?
Comment #11
chiebert commentedRe #10 - Yep, I'm just seeing this now myself. Was twigged to the fact when I noticed my media-related Feature was showing as overridden, after I undated to linkit-7.x-3.3. a
drush features-diffshowed exactly what you describe: theentity:file[]array has been clobbered. Any ideas how to get us back on track?Comment #12
ashalan commentedRecategorizing this issue as a bug. Will try to upload a db fix today.
Comment #13
ashalan commentedThis patch should fix issues with saving profiles. It should also fix issues with patch tests failing on d.o
Comment #14
ashalan commentedComment #15
punch commentedThe patch do not fix the problem described in #6
Comment #16
knalstaaf commentedPatch in #13 works for me. Thanks Ashalan.
Comment #17
eric_a commentedThat function
linkit_update_7302()is in the 7.x-3.3 release and here to stay. Patch #13 will only do something if you patch the code and only then run the existing update function.What is needed is a new update function to fix installations that have run the 7302 update.
Comment #18
ciss commentedNew update hook and sanity checks.
Comment #19
ciss commentedComment #20
ciss commentedBy the way, in our case the problem was likely caused by using an older feature export with a recent version of linkit. The above patch will only work if it has not been committed and the update hook hasn't been occupied by other updates yet.
The cleanup should probably go to something like features rebuild.
Comment #21
sylus commentedThe patch works for me and I don't see the harm in keeping it as an update function for 7303. Why not commit this new update hook?
Something I am missing?
Comment #22
tenken commentedA client says they're getting "An illegal choice has been selected in the form. Please contact the site administrator". They have recently updated to LinkIt 3.4 installed.
The manually deleted the Profile and rebuilt it by hand in 3.4, this seems to have resolved the profile saving issue temporarily.
Why was 3.4 released without including the fix outlined in this thread (lack of testing?), or is this not a verified issue, wouldnt it affect most everyone who has run the 3.2 update?
Comment #23
anonWell, that commited update hook will and have broken things for sure.
I don't know about profiles saved with features, but for regular profiles saved in DB I don't think it's possible to "restore" them if the update is applyed.
To solve that issue, shall we empty the 7302 and apply the corrected version (#13) as 7303 to start with?
Comment #24
anonI think this patchs solves the issue with the broken update hook.
I have tested this from 3.2 to 3.x. Both when the broken 7302 is applied and not.
@punch: Your problem sounds like a feature export issue.
Comment #25
anonComment #26
punch commentedNo not a feature issue. Thanks for the #24 patch it solved almost my problem.
I have multiple profiles, but the patch only work on one.
You have if ($show_notice) {..} inside the foreach. It return from foreach first time it is TRUE. Placeing if ($show_notice) {..} after foreach solve this issue.
Comment #27
anon@punch: Thanks, thats true, my bad.
Comment #28
anonPushed patch 24.