We were look at ways to have machine names in d7 and instead of going the route of creating a new field for machine name, and then having things operate on it, we wanted to explore replace the qid with a machine name.
After the nodequeue have a machine name (which is unique) there is no real need for a qid, as they are fulfilling the same function. It seems to me, the move to d7 is a good transition point for make the switch. And this way we only have one unique field that also is portable.
I have created a patch to experiment with this.
The current patch:
* changes the qid to a varchar
* adds a machine name field to the edit form (which is disabled if not new)
* in nodequeue_add, if there is no qid it grabs the machine name and uses it (otherwise it sets a quid)
The following are then things that i know need to be added
* update hook for field change and data conversion
* same process with subqueues
* get the machine name field to validate as a machine name (currently it is just a textfield)
So I want to continue down this road, but if it seems like this is not the way you all want to go please let me know so I can shift to a more acceptable path.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | 1023606-nodequeue-update-to-new-name-13.patch | 1.77 KB | hefox |
| #12 | 2117033-openpublic-nodequeue-3.patch | 7.09 KB | hefox |
| #11 | 1023606-nodequeue-update-to-new-name-10.patch | 909 bytes | hefox |
| #10 | 1023606-nodequeue-update-to-new-name-10.patch | 909 bytes | hefox |
| #9 | 1023606-nodequeue-update-to-new-name-9.patch | 714 bytes | hefox |
Comments
Comment #1
ericduran commentedI know is a different version but there's already #817558: Machine names
Comment #2
e2thex commentedYes I saw that, I thought that was for 6.x. And was thinking that the move to 7.x might be a good time to use machine name instead of qid. As opposed to using both.
Comment #3
e2thex commentedso for this patch I have converted all of the sqid to varchars. and am assigning a guid to them on creation
Comment #4
e2thex commentedso that patch had some extra stuff in it, I took all of that out.
Comment #5
e2thex commentedOk this time i really removed the part of the patch that was not related to the change
Comment #6
tobby commentedI have rerolled this patch to address an autocomplete issue, where sqid was looking for a numeric value.
It will apply to alpha1 as well as HEAD.
Comment #7
amateescu commentedThis won't happen in the current branch but for sure in a future 7.x-3.x branch (when we decide that it's time to start it).
7.x-2.x should stay as close as possible to 6.x-2.x.
Comment #8
duaelfrIt is time ! We need this to fit to Drupal new orientations and to properly interface with modules like Features. :)
Comment #9
hefox commentedPatch that changes the 7.x-3.x update to work with sites using this patch
Comment #10
hefox commentedtry 2
Comment #11
hefox commentedtry 3, sans https
Comment #12
hefox commentedIgnore patch below
Comment #13
hefox commentedneed to update subqueues to not have varchar for sqid