Closed (fixed)
Project:
Field Conditional States
Version:
7.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
31 Oct 2013 at 01:41 UTC
Updated:
13 Feb 2014 at 22:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
hass commentedPatch attached:
Comment #2
hass commentedComment #3
Tobias Xy commentedI think this will be a great patch. It looks good, but the upgrade path has to be thoroughly tested, because it isn't really trivial.
-In version 1.x only the bundle is stored in the database, not the entity. So I guess it's possible to create conditional states for entities that aren't nodes, but if two different entity types have a bundle with the same name, there will be a lot of confusion (errors, unexpected behaviors, etc.). So it isn't easy to determine the entity type a bundle in 1.x is referring to. But probably most of the people used FCS only for nodes, so assuming 'node' as entity for 2.x should be ok here.
-The trigger_state should be "checked" (or "unchecked") for boolean control fields and "value" for control fields that are select lists.
That was just a quick review of your patch. I'll test the upgrade path this evening.
Comment #4
Tobias Xy commentedNo major changes, just made sure, it can be applied to the latest dev-version.
Comment #5
Tobias Xy commentedI just tested the upgrade path and solved a lot of problems:
-two syntax errors
-The field trigger_state has to be added during field_conditional_state_update_7200
-When adding the new fields to field_conditional_state an initial value must be given. Otherwise the update will fail.
-We have to create a FCS group for each condition of version 1.x
-A few other things
TODO:
-For checkboxes as control fields "checked" must be used (not 'value').
-Currently it's not possible to use drupal_html_id in field_conditional_state_element_process without breaking the states functionality on the form. (See #2110913: drupal_html_id for id's)
Comment #6
Tobias Xy commentedComment #7
Tobias Xy commentedComment #8
Tobias Xy commentedThe appended patch should be good to go.
Because the upgrade from 1.x to 2.x isn't that easy, it should be thoroughly tested now, before we finally release a stable version.
Comment #9
hass commentedHow about committing if you know it works well? I do not expect any tester.
Comment #10
Tobias Xy commentedIt's a very complex migration, so I can't guarantee, that it is out of bugs. I will make a few tests and after that going to commit it, because you're probably right: No testers expected... :D
Comment #11
hass commentedWhat is the reason for setting the module weight? This should be documented in the install hook.
Comment #12
Tobias Xy commentedIt was set in 1.x too, so I think it is there for a reason. peem83 should know it, but I don't... (Unfortunately it was there since the first commit of FCS, so there is no issue describing the reasons for that).
Comment #13
hass commentedNothing to worry, we may change it if we find out.
Comment #14
Tobias Xy commentedI finally committed the patch. Any follow up issues should probably be handled separately.