Usually the Asset module creates Asset views page with this kind of URL : admin/content/assets/view/%aid. However a customer who wants to have an asset gallery with a link to the full asset page, prefers to have an URL without "admin" inside.
This module provides support functions for asset modules to automatically generate aliases based on appropriate criteria.
It has three dependencies to Asset, Pathauto and Entity tokens modules.
Asset Aliases is an extension to the asset module, which must be downloaded and enabled.
Asset Aliases also relies on the Pathauto and Entity tokens modules, which must be downloaded and enabled separately.
This module allows users with permissions (Drupal's default administrative account or users with "administer pathauto" permission) to manage patterns, to delete and to update aliases for the asset view page.
My sandbox is located at : https://drupal.org/sandbox/jojo-m/2236743
Git repository : git clone --branch 7.x-1.x http://git.drupal.org/sandbox/Jojo-M/2236743.git asset_aliases
I open a feature request at the Asset module project to ask to the maintainers if they want to integrate my sandbox into the Asset ecosystem. But without answer from them since 1 month I have decided to propose my sandbox to become a full project.
You will find my issues here : https://drupal.org/node/2236827
Reviews of other projects :
- https://drupal.org/node/2235289#comment-8792551
- https://drupal.org/node/2258079#comment-8792807
- https://drupal.org/node/2274327#comment-8826251
Best regards.
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | pareview_results.txt | 1.38 KB | mpdonadio |
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
dasfuller commentedRuns through pareview cleanly with only complaints about the number of blank lines at the end of .info and the readme.
http://pareview.sh/pareview/httpgitdrupalorgsandboxjojo-m2236743git-master
Installs without errors.
Comment #3
dasfuller commentedCoder threw back no errors.
Comment #4
gmaheux commentedThank you for the comments, corrections have been corrected.
Comment #5
MattWithoos commentedI would suggest removing the master branch and creating a 7.x-1.x (or as appropriate) branch.
See step 5 and 6.
https://drupal.org/empty-git-master
Comment #6
gmaheux commentedI removed the master branch and I created the 7.x-1.x-dev branch.
Comment #7
gmaheux commentedComment #8
gmaheux commentedComment #9
gmaheux commentedComment #10
gmaheux commentedComment #11
gmaheux commentedComment #12
gmaheux commentedComment #13
nuezHi Jojo-M
Thanks for your contribution, I've reviewed your module, but can't really find any errors to comment on. Everything looks clean and works fine. There are two errors on parereview.sh but by no means showstoppers.
But I do have some 'devil's advocate-type' questions about this module, about some of the code and how it works compared to the pathauto_entity module.
I realised that this module reproduces a lot of code of the original pathauto module, even the comments are the same. The fact that the comments (here and there replaced with the word 'asset') are the same is not really important here, I personally don't mind, don't know about comment copyrights...:). But it does make me think about possible code redundancy.
For example at asset_aliases.module:193 you could literally say
instead of
(I've tried it).
As for the already existing pathauto_entity module: the Pathauto Entity module does for all entities, what you do the Asset entity only. On the other side your module adds the possibility to change the path per asset, the same way the pathauto module allows you to change the path per node.
I see no crucial errors in this module, not even minor errors, but do think that submitting a patch to pathauto or pathauto_entity, or create a dependency of pathauto_entity, could work as well. No need to change the status though.
Comment #14
gmaheux commentedHi nuez,
Thanks for your comment. I will work on the code redundancy soon.
I don't know if it's a good idea to create dependency with pathauto_entity. This module works fine but it does not have a recommended release version at this time.
And it allows users to create alias on entity like boxes but does not create alias because it's a box, it allows users to manage also admin alias. In my opinion it's not a good idea. Usually you use alias to create nice URLs to have a better SEO and better navigation for people in the front of the website, not for the backoffice.
I think that it's better to propose to patch pathauto module. But I think that pathauto needs to work only with the drupal core entity. If you want that a new entity has an alias, you must implement in this module Pathauto's APIs.
In the beginning I wanted to integrate my module to Asset eco-system to be an option for Asset . But I have never got an answer from the maintainers of Asset module. (https://drupal.org/node/2236827)
I know that it is not interesting to have a lot of modules that make almost the same thing but I would like to know what do you think about it ?
Best regards.
Comment #15
mpdonadioAutomated Review
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.
Manual Review
You don't need to variable set in asset_aliases_install(). Just use the default when you variable_get().
(+) asset_aliases_uninstall should use Path API to get rid of the aliases (so hooks fire and the path cache gets cleared). Also that wildcard will likely catch things it shouldn't.
(+) You have a single variable in the module. Just variable_del() in the uninstall. Wildcard db_delete on the variables table can be problematic.
Look into hook_module_implements_alter() to change the hook execution order instead of setting the weight in the install.
You don't need to `if (module_exists('asset'))` if you have a dependency. Also elsewhere.
Your db_select() in asset_aliases_pathauto_bulk_update_batch_process can use chaining, except for the joins.
A bunch of your docblocks are wrong. For example, "Implements hook_insert()." should be "Implements hook_asset_insert()." Look at all and fix when you can.
If you have derived code, it would be best to document where it came from.
(+) Can you explain the top level if() at line 361 in asset_aliases.module? One, a module implementing a hook for another module is weird.
This is more a note to myself and other reviewers, but the user_access() mirrors the path.module.
Seems to work. No third-party code, I think duplication/collaboration has been adequately addressed, and I am not seeing any security concerns.
The items marked (+) should be addresses, but I don't see the as show stoppers.
Setting RBTC, but the unofficial policy is for admins to not mark as Fixed upon their own review, so this will another review or a waiting period for other people to chime in.
Comment #16
nuezHi Jojo-M,
Sounds like you've considered all the options regarding pathauto and pathauto entity, so like mpdonadio says, my question was adequately addressed.
Comment #17
mpdonadioOK, about two weeks have gone by without any objections. I took a look at the project again (which didn't look like it had changed), and I stand by my review. There are a few high priority items that should be addressed, but no blockers. So...
Thanks for your contribution, Jojo-M!
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.