Closed (fixed)
Project:
UUID Features Integration
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Apr 2013 at 13:10 UTC
Updated:
9 Jul 2014 at 17:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
k0teg commentedHere is the patch.
Comment #3
k0teg commentedReformatted the patch.
Comment #4
k0teg commentedComment #6
k0teg commented#3: uuid_features-1973770-3.patch queued for re-testing.
Comment #8
k0teg commentedHere is the patch with a little clean-up.
Comment #9
robinvdvleuten commentedWhen I apply the patch, I get some errors about an undefined index of the node types array. I've added the patch which fixes this.
Comment #10
robinvdvleuten commentedI also made the labels of the field_collection more user-friendly. Instead of displaying an UUID, it now displays the type and the label of the collection.
Comment #11
robinvdvleuten commentedOops, added the same patch twice. This is the one with the field_collection label fixes.
Comment #12
k0teg commentedHere is a new patch (it is merged with #11 - https://drupal.org/node/1973770#comment-7367838).
The patch includes:
Comment #14
k0teg commentedHere is the fixed patch.
Comment #16
k0teg commentedAnother try :)
Comment #16.0
k0teg commentedFixed typos.
Comment #16.1
k0teg commentedRemoved 1 sentence.
Comment #17
dubois commentedSharing a few tweaks to patch in #16.
Comment #18
saltednut#17: uuid_features-1973770-17.patch queued for re-testing.
Comment #20
saltednutLooks like this just needs a reroll and probably some code review wouldn't hurt - really love what you're doing here @k0teg
Comment #21
boobaaSee also: #1932320: Add support for entity references as it may have some other useful information.
Comment #22
mikeharty commentedRe-rolled patch. (Git gave me some whitespace warnings on apply, not sure why, I followed these instructions exactly: https://drupal.org/patch/reroll)
Comment #23
mikeharty commentedFixing status
Comment #24
claudiu.cristeaPHP 5.4 is yelling:
Better replace this line with:
I tested the field collection and looks great. Thank you :)
Comment #25
claudiu.cristeaThere's also a BIG problem with the patch from #23: Nodes (
uuid_node) are disappearing from interface. Seed that are no more discovered.Comment #26
claudiu.cristeaThis change is bad because every time will end with an empty
$typeand will exit prematurely in with an empty array.Returning all node-types nodes is not a bad option while already used nodes are coloured with red.
Here's a patch based on #23 and addressing #24 and this issue.
Comment #27
claudiu.cristeaComment #28
claudiu.cristeaFixed another PHP 5.4 notice. See interdiff.txt.
Comment #28.0
claudiu.cristeaCleaned up the original message.
Comment #29
justanothermark commentedRerolled patch #28 so that it applies to 7.x-1.x. Functionality only tested for Entity Reference field (that works) and haven't reviewed the code itself to see if anything should change based on changes to 7.x-1.x since #28 was created.
Comment #30
mraichelson commentedThe exported content for field_collection items is getting mangled a bit. Looks like it's getting URL-encoded, then having escaping slashes applied multiple times (and more and more if you start to update things after trying to move them around).
Going to try seeing if I can figure anything out for this.
Comment #31
mraichelson commentedI don't believe this is a solution that really scales out but as a temporary workaround I've posted a gist here that has modified code for uuid_field_collection.features.inc (lines 79-87 are new code, the rest is the resulting state of things after applying patch #29).
I'm in a major time-crunch right now but will try looking for a more robust answer and creating a patch later.
Comment #32
byronveale commentedApplied patch 29 to 7.x-1.x branch. Unfortunately, it does not include the functionality I'm looking for, which is the ability to include taxonomy terms in a feature (as outlined in the original post). As such, I am updating the status to "needs work".
This functionality was present in 7.x-1.0-alpha3, but disappeared in latest version, 7.x-1.0-alpha4.
I am curious as to why exporting taxonomy terms was listed as part of this patch, as it looks as if alpha3 was released before this issue was opened (released 30 January 2013). But that just may be me…
Here's a question from a module-creating-noob: would it be worthwhile to compare the code from alpha3 with the latest version, to try to see where the taxonomy term export code was?
Thanks for everyone's efforts with this.
Comment #33
byronveale commentedOkay, sorry about that: alpha4 introduced a settings page at /admin/config/content/uuid_features that I had never previously discovered. In it are options to include exporting taxonomy terms. So resetting this back to "needs review".
(Whaddaya know, it _was_ useful to compare the code between alpha3 and alpha4, I saw the "hook_menu" function, that told me to go look for a page!)
Comment #34
msmithcti commentedThe variable being get in uuid_features_file_field_export() doesn't match those set in the settings form in #29. This patch fixes that.
Comment #35
msmithcti commentedNow realised that the above exports correctly but on reverting, the images aren't correctly imported. This is because uuid_features_file_field_import() is used instead of uuid_features_file_field_export() in uuid_field_collection_features_rebuild().
This patch fixes the above.
Comment #36
das-peter commentedPretty impressive patch! Thanks for all the hard work.
I just started using it in a new project and stumbled over some issues.
I started overhauling the patch and made lot's of changed. However, the main logic is still the same - I've mostly changed the hooks, coding standards, missing docs, missing removes of legacy code.
The field handler now use those hooks instead node/user/term specific ones.
uuid_node_features_export_render()/function uuid_node_features_rebuild()had some code hunks that seemed to interfere with the new code (// Export taxonomy_term_reference with its UUID.) - removeduuid_features_settings()- removedReviews would be very appreciated. I did testing but definitely didn't cover all scenarios.
Edit: fixed typo
Comment #37
das-peter commentedNext patch:
entityreference_uuid_node_features_rebuild_alter(): it's nowentityreference_uuid_entity_features_rebuild_alterIf a node couldn't be saved it's likely due to missing references. Multiple runs will build up the targets of those references and resolve the dependencies. We could make the maximal nesting level configurable - it's set to 5 now.
Comment #38
das-peter commentedNext patch:
hook_uuid_entity_features_export_render()for other entity types: bean, field_collectionhook_uuid_entity_features_export_render()invocation for taxonomy termshook_uuid_entity_features_export_render()/hook_uuid_user_features_export_render()invocation for users$exportobject for the hook invocation is actually a clone! Had "cache poisoning" with user and enabled entitycache.Comment #39
sirclickalot@das-peter, I'm a little confused here and could use some guidance because while I completely understand your point about unifying via the fact that users, roles etc. are indeed all entities, the patch in #37 patch (uuid_features-users-etc-integration-1973770-37.patch) appears to relate to in include 'includes/modules/entityreference.inc' which does not appear to be part of 7.x-1.0-alpha4?
Ultimately I'm looking to be able to include the following on my Feature...
Taxonomies - already handled by Features
Taxonomy terms - handled via UUID Features Integration
Nodes - handled via UUID Features Integration
Roles - handled via UUID Features Integration
Users - HOPEFULLY handled by your patch!
Thank you
Comment #40
das-peter commented@SirClickALot Hope you'll find time to give the patch a review :)
The file
includes/modules/entityreference.incis newly created by the patch - you can see that in the patch here:/dev/null means the file doesn't yet exist.
This issues doesn't specifically relate to users but many other things - check the issue summary.
Never patch against a release but always against HEAD of the git repo.
Comment #41
das-peter commentedNext patch:
Comment #42
das-peter commentedNext round:
Damn I really should stop adding more cleanup :| But there's already a entity translation integration just waiting to be integrated ;)
Comment #43
das-peter commentedNext patch:
uuid_node_features_export_options()uuid_bean_features_export_options()uuid_field_collection_features_export_options()Comment #44
das-peter commentedFixed wrong function call.
Comment #46
das-peter commentedBold move on my side: After talking to Jeffrey and he gave me a) committ-permissions and b) a go for the patch here we go:
Credits went to k0teg - as I understand he was the initiator :)
Thanks to all participants!