Sandbox page:
https://drupal.org/sandbox/ioskevich/2163429
Git repository:
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/ioskevich/2163429.git uuid_features_menu
cd uuid_features_menu
Overview
UUID Features Menu module adds Features support for menu items using UUIDs instead of default mlid identifier. Each menu item receives UUID hash and can be transferred with Features without using mlids. For core entity types (Nodes, Users, Taxonomy) this module will export menu items paths like 'node/[UUID]' which will be translated into normal "node/[NID]" when enabling Feature on target instance.
Use case: move entities together with menu links pointing to them across various Drupal instances.
Features
- UUID support for menu items exported through Features
- UUID support for menu items' exported paths for core Drupal entities: Node, User, Taxonomy Term
Requirements
Credits
Based on the work by jrao from https://drupal.org/comment/8160229#comment-8160229
Comments
Comment #1
PA robot commentedWe are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #2
heddnComment #3
heddnNo need to return anything from a hook_install/uninstall.
return db_add_field('menu_links', 'uuid', $schema['menu_links']['fields']['uuid']);return db_drop_field('menu_links', 'uuid');To avoid coder flagging exportables, might I suggest this small change? This format matches fields base and fields instance exports.
Comment #4
ioskevich commentedComment #5
jneubert commentedFirst of all, thank you very much for carrying on this module, which solves a real need. I'm highly interestend in using it.
I'm doing allmost all work with features through drush. When installing your module, I got a message "Postgres doesn't currently have UUID functions build in. Please click here to generate UUIDs for your missing menu items." Hmm - no button in drush, but I supposed, would solve the problem.
However, when I tried , nothing about uuid menus showed up. The README.txt didn't help either. Only after navigating to admin/structure/features screen, I spotted the newly added tab "Generate UUIDs for Menu Items", which solved the problem.
Perhaps, you could delegate all the user interactions re. generating UUIDs to the UUID module? This would meet exspectations built by other modules, and additionally avoid a menu-specific tab (only used once) in the general features admin screen.
If this isn't feasible, it would be helpful to have a hint in the README.txt.
Comment #6
ioskevich commented@jneubert - this is a full project application issue, and you request seems a bit like feature request to me. I saw it added to the project Issue - thanks, will work on it as time allows.
@heddn - finally got some time to address comment #3, thanks for pointing out.
Comment #7
dmitrii commented#3 fixed
http://drupalcode.org/sandbox/ioskevich/2163429.git/commit/1b3c154
http://drupalcode.org/sandbox/ioskevich/2163429.git/commit/1b3b4b3
Comment #8
jneubert commentedWell, I tried to separate the feature request re. extended drush integration and the interface issues with the current state of the module (as described in #5). Users who will work with your module will have worked before with features and most probably with the uuid_features module. features provides a powerful drush integration, and uuid_features uses the same interface as the uuid module for generating UUIDs. So I'd suggest to consider if this interface can be reused, or otherwise to put hints about the difference into the README.txt - simply to make life easier for users coming with experiences from the mentioned modules.
Comment #9
ioskevich commentedComment #10
heddnI tend to agree with #2241567-8: UUID Features - Menu. Either something should be added to the project page and README about the different support for postgress and lack of support for drush. Or use
uuid_generate()from the uuid module.Comment #11
ioskevich commentedWill see how much time is needed for Drush integration (through UUID_features module). This is not something we needed for the project this module was created for, so I tend to think that this might be something that could be addressed by the folks who needs this feature :)
Either way, will update README at least.
Comment #12
jneubert commentedSorry for not having been clear here: I did definitively not want to suggest that drush integration is mandatory for the project application. A hint would help site builders, though - and it's relatively cheap ;)
All the best - Joachim
Comment #13
sawabe commentedComment #14
heddnAutomated Review
n/a
Manual Review
uuid_generaterather than_uuid_features_menu_generate_uuids()uuid_features_menu_resolve_path().The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.
If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.
Comment #15
vtkachenko commentedHi ioskevich,
Did you try to use hook_uuid_sync() instead of manual trigerring via menu.
I tested this was, and it was fine for me.
You can replace this code:
With this one:
And remove next lines then:
-batch_process('node/1');
-drupal_goto('admin/structure/features');
Comment #16
ioskevich commented@heddn re:
This module development is a team effort, sponsored by our company. I don't really care which of the committers gets credited for it. We of course do not ask for full project access for all committers.
For remaining comments from #14 and #15 - will be addressed in next couple of days.
Comment #17
gwprod commentedioskevich: the reasoning for the individual account is that this is primarily a test of individual The Drupal Way adherence.
Does that make sense?
Comment #18
heddnCan I assume then that ioskevich is the chosen individual? He must have actual commits that demonstrate his knowledge of the Drupal API.
The rest of the committers can come back later whenever they want to promote new projects. The other option is to pursue a single project promotion. In that option, a git admin promotes this project to a full project on your behalf, but no one becomes a git vetted user.
Comment #19
ioskevich commentedWell, seems that there is too many back and forth around this module, especially given it's pretty narrow area of application :)
My personal (ioskevich) contribution to this module is that I published it at d.org - it's originally developed by another user (it's clearly stated at the module project page) - and added support for one more core entity type. This might not be enough to prove my knowledge of Drupal APIs, however, you can take a look at my other sandbox projects or commits to other modules, if that's so important.
I assume, it's up to you guys wether this should be promoted to full project with my account granted full project permissions as well, or just a module is promoted to full project, keeping my user account in sandbox - we need this module for our projects anyway so we will keep maintaining it as our time allows.
Comment #20
sawabe commentedMade some code refactoring addressed to https://www.drupal.org/node/2241567#comment-8934079 and https://www.drupal.org/node/2241567#comment-8946115
Comment #21
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxioskevich2163429git
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #22
sawabe commentedhttps://www.drupal.org/node/2241567#comment-8980653 should be fixed now
Comment #23
ioskevich commentedComment #24
heddnBased on git commit history, no single individual has demonstrated familiarity with the Drupal API. The original request was opened by @ioskevich, but then that individual hasn't made any commits for the last 2 months. The other two commiters since then have made a few changes, but nothing significant enough to demonstrate their Drupal coding competency. Assigning to another reviewer to make the final call but this application feels like it is a good candidate for a single project promotion.
Moving to RTBC as all feedback in #2241567-14: UUID Features - Menu is now addressed.
Comment #25
mpdonadioAutomated Review
Review of the 7.x-1.x (124b3c5) branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
(+) The warning is a big one. Change the db_query in uuid_features_menu_link_set_uuid to a db_update.
Manual Review
The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.
Please don't remove the security tag, we keep that for statistics and to show examples of security problems.
I also agree with @heddn that we need to do single-project promotion with this.
Comment #26
ioskevich commentedComment #27
littledynamo commentedI'd just like to chip in here and say that I've tested the functionality of this module and it works as expected. There are a couple of errors and warnings thrown at various points, although these don't seem to affect the funcitonality in any noticeable way:
When enabling the module:
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS , t. AS t_ FROM t WHERE ( IN (''))' at line 1: SELECT t. AS , t. AS t_ FROM {} t WHERE ( IN (:db_condition_placeholder_0)) ; Array ( [:db_condition_placeholder_0] => ) in entity_get_id_by_uuid() (line 375 of /var/aegir/platforms/inathke-7.31-prod/sites/all/modules/uuid/uuid.entity.inc).When creating the feature:
Warning: call_user_func() expects parameter 1 to be a valid callback, no array or string given in uuid_features_menu_encode_path() (line 139 of /var/aegir/platforms/inathke-7.31-prod/sites/all/modules/uuid_features_menu/uuid_features_menu.module).Comment #28
PA robot commentedClosing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.