Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I am currently developing custom breadcrumbs integration with module features so that custom breadcrumbs can easily be exported and reused among features and drupal instances.
Is anyone interested in the public release of the code or integrate it directly in module core?
Thanks
Hernani
Comments
Comment #1
MGN CreditAttribution: MGN commentedI am interested in learning more about this. What's required to do this? Can you provide some details?
Comment #2
hernani CreditAttribution: hernani commentedHi MGN,
Basically features allows you to export your module definitions to code, so that they can be imported in other drupal installations, compared, synchronized or updated.
Basically what is needed to achieve this is to change the way how custom breadcrumbs access data, so that instead of checking only in the database table it could also check in modules hook.
I think that custom breadcrumbs could achieve this if we stop to use the bid identifier in custom breadcrumbs table, and try to find other primary key for custom breadcrumbs that can be a string no auto-incremented. A key like node _ language, or views_path seems good candidates to this.
Right now i can not do this without this change.
I can provide some of the code developed, so we can achieve this feature and allow that custom_breadcrumbs can be exported along with spaces, contexts, pages, views, etc..
Comment #3
redben CreditAttribution: redben commented+1 for Features integration !
Comment #4
ademarco CreditAttribution: ademarco commentedSubscribing.
Comment #5
mrfelton CreditAttribution: mrfelton commentedyes please!
Comment #6
techninja CreditAttribution: techninja commented+1 - An absolute must for anyone using breadcrumbs and features
Comment #7
detot CreditAttribution: detot commented+1
Comment #8
redben CreditAttribution: redben commented@hernani have you been able to make this feature work ?
Comment #9
hernani CreditAttribution: hernani commentedI was unable to finish this task, mainly because features needs that each exportable object have an unique identifier that do not depends on auto increment keys, like custom breadcrumbs is currently using.
If it would be possible to identify custom breadcrumbs with other identifier (like a unique machine name), would be really easy to integrate with features..!
Are module maintainers available to change this behavior?
Hernani
Comment #10
mrfelton CreditAttribution: mrfelton commentedAlternatively, I think it's possible to use exportables to generate the unique keys for you... or something like that. But, clearly changing custom_breadcrumbs would be preferable.
Comment #11
MGN CreditAttribution: MGN commentedSo instead of storing bid in an autoincrement field, if we stored a unique string like
'$_SERVER["SERVER_NAME"]' . '-' . $bid;
then it would integrate with Features? Is there anything else that would need to be done?
Sorry, again, I haven't used Features so it would be helpful for someone to fill in all the necessary details.
Comment #12
redben CreditAttribution: redben commentedWhy not use "BREADCRUMB TYPE" and "NAME" as they appear on "admin/build/custom_breadcrumbs/list"
edit:
For the name, it would need to be translated to machine name.Breadcrumb names are already machine names.Comment #13
rickvug CreditAttribution: rickvug commentedHow adopting cTools' model for exportables? If I'm not mistaken, Features will automatically notice that Custom Breadcrumbs uses this common format and will provide the necessary integration. In another scenario, if Custom Breadcrumbs used variables for storage then Strongarm (2.x branch) would provide the cTools exportable and Features integration on behalf of the module.
Comment #14
mrfelton CreditAttribution: mrfelton commentedI'd rather see Custom Breadcrumbs implement cTools itself that rely on strongarm to export all of it's configurations via variables. Strongarm becomes particularity problematic to use effectively wit large websites with many modules installed due to the sheer number of variables.
IMO variables should be used to store simple settings and these can be exported with Strongarm. Modules that have more detailed configurations (such as custom breadcrumbs) should provide their own way to export via Features, possibly using cTools.
Comment #15
MGN CreditAttribution: MGN commented@rickvug, thanks for tagging this issue and others like it. I am learning a lot by reading what others have done, including Stella's blog entry that describes the basic idea. I think I am starting to see the (ctools) light...It opens up some interesting possibilities in addition to the Features integration.
Comment #16
rickvug CreditAttribution: rickvug commented@MGN You're welcome. I don't mind doing a little bit of organization and hand waving from time to time. The prospect of being able to easily push config to code has been a long held dream for many. IMO the pathway forward has never been as clear. Time to rally behind a common API.
Comment #18
MGN CreditAttribution: MGN commentedAfter making the following change to the custom_breadcrumb table (adding a unique key combining bid and node type), I was able to build a functional ctools export form. I've also developed a working import form within custom breadcrumbs that takes the code from the export form and adds a new breadcrumb into the database.
There are many possibilities here, but I think the only change you might need to proceed with the features integration is the unique key, so I've attached a patch for the custom breadcrumbs install file. With this, features now recognizes custom breadcrumbs (it shows in the select at admin/build/features/create), though the exportable objects obviously aren't rendered since the feature hooks have yet to be implemented.
It seems the next step would be to implement the key features hooks, but I haven't looked too deeply into that yet. Perhaps someone else who knows these hooks better than I can develop the implementation? Is this done with the features module (i.e. features.custom_breadcrumbs.inc), or within custom breadcrumbs directly?
On another note, does it make sense to add export/import operations (and forms) within custom breadcrumbs for exporting without features? We could even goes as far as providing default custom breadcrumb objects that can be overridden (as with views, etc.). Would this be a signifcant advantage , or is database storage sufficient?
What are your thoughts and suggestions for moving forward?
Comment #19
MGN CreditAttribution: MGN commentedComment #20
mani.atico CreditAttribution: mani.atico commentedFrom my point of view, using ‘node_type’ (or other identifiers as ‘tid’) and bid fields could be inconvenient when exporting or modifying the feature: you’ll get a bunch of numbers and you’ll have to know to which “object” this numbers refers to – if you have two breadcrumbs settings for a single node type you’ll have to know the bid number of the cb setting you want to export, and it could get worst when the “object” identifier is another number (tids for example).
This could be ‘fixed’ in the administrative interface by implementing some features’ hooks, but this solution would be no good if you’re using drush to build you’re features.
On the other hand, as bid is just an auto incremental field it should be excluded from the exported object and should not be written into the database of the site where the feature is being installed (check the ‘no export’ setting on the Ctool’s advanced help documentation). I think (I’m not completely sure) that if this field is taken out of the exported object but is used as part of it’s identifier, that relation of the object in the database and the one in code would be lost.
I think that a machine-name field should be added to the schema. It could be the 'name' field – set as unique and restricted to machine-readable characters - or another field which generates it’s value by replacing invalid characters of the ‘(friendly) name’ field could be added. This would be the machine-readable unique identifier needed to integrate with features through the CTools’ API.
The second part of the proposal is a bit shaky since I haven't check the code throughfully. I don't know if the proposal I'm about to make might have negative impacts on code, performace, ease of use, extensibility, ease of imlementation, etc. Or if it will mean re-coding the whole module. I apologize if this has been discussed anywhere else, it’s just a start point which might be useful for someone who is more familiar with the code:
I've noticed that cb and each submodule declares the same db schema except for a single field whcih holds the id or information of the "object" that triggers the custom breadcrumb: node_type, view_path, panel_id, etc. How about merging all schemas into a single table by removing the field which holds the id and adding two new fields: type and id? type would hold the name of the "object" to which the custom breadcrumb should be applied (“node_type”, “view_path”, “panel_id”, etc) and id would hold the identifier or the relevant data needed to determine when to trigger the custom breadcrumb (the name of the node type, the path of the view, the id of the panel, etc). This way features integration could be provided from a single place without having to re-declare the CTool's schema specifics on each submodule and exportable objects would be automatically generated for modules which declare cb settings through the API.
Comment #21
gmclelland CreditAttribution: gmclelland commentedFor what it is worth, here is some information I have been gathering
Articles about features
http://www.lullabot.com/articles/site-development-workflow-keep-it-code
http://civicactions.com/blog/2009/jul/24/using_chaos_tools_module_create...
http://sf2010.drupal.org/conference/sessions/leveraging-chaos-tool-suite...
http://www.sthlmconnection.se/tips-and-tweaks/exportable-configuration-y...
Features Integrates with
http://drupal.org/project/context
http://drupal.org/project/boxes
http://drupal.org/project/kit - for features standards
http://drupal.org/project/ctools
http://drupal.org/project/strongarm
http://drupal.org/project/spaces
http://drupal.org/project/context_admin
http://drupal.org/project/css_injector
http://drupal.org/project/features_extra
http://drupal.org/project/input_formats
http://drupal.org/project/package_builder
Modules with feature integration
http://drupal.org/taxonomy/term/11478
Hope that helps, would love to see exportables for custom breadcrumbs.
Comment #22
lelizondo CreditAttribution: lelizondo commentedsubs
Comment #23
muhleder CreditAttribution: muhleder commentedsubscribing
Comment #24
ygerasimov CreditAttribution: ygerasimov commentedI would be very interested in developing integration of custom breadcrumbs with features. Can I help somehow?
Comment #25
davidburnssubscribe
Comment #26
mikebell_ CreditAttribution: mikebell_ commentedsubscribe.
Comment #27
rjivan CreditAttribution: rjivan commentedAny update on this?
Comment #28
hernani CreditAttribution: hernani commentedAt the time i was not able to finish this task, and I ended up not using it on the feature i was developing.
I see that are still interested people on this capability, i will try to pay some attention to MGM's changes posted in #18 and understand if it is now possible to implement it.
Comment #29
iStryker CreditAttribution: iStryker commentedI'll take this over
Comment #30
iStryker CreditAttribution: iStryker commentedUpdate: I have integrated Ctools export with Custom Breadcrumbs and it works, however it only works for node_type, and none of the other submodules. I'm having troubles as the user interface is a little different, and each module has a separate table. I am trying to create a user interface that will be able to do everything. I am currently having trouble with FormAPI and AJAX. I posted an issue on Ctools. http://drupal.org/node/958572. Any help would be appreciated. If not, then I'll keep struggling
Comment #31
ygerasimov CreditAttribution: ygerasimov commentedI would like to give support on developing 'exportables' for this module. I have found another approach using features hooks http://treehouseagency.com/blog/thomas-wysocki/2010/10/28/making-your-mo...
@iStryker: Is there any repo where I can see development of this feature and get involved?
Comment #32
Jackinloadup CreditAttribution: Jackinloadup commentedsubscribe
Comment #33
wizonesolutionsInterested in this as well since the crumbs already have a "name" and since paths are likely to be the same across sites.
Comment #34
alberto56 CreditAttribution: alberto56 commentedSubscribing. Thanks for your work.
Comment #35
soulfroysIt would be awesome *feature*!
Comment #36
alberto56 CreditAttribution: alberto56 commentedMeanwhile, here is what I do: in the install file of the feature (create one if one does not already exist), add the following or integrate into the existing install hook implementation:
If your feature is already installed and you are adding this functionality, you will have to add an update hook implementation and then run a database update on your target site, because the install function will never be called (of course, we're not really touching the database here. Rather, we're hijacking hook_update_N(), which is meant for database updates, and using it for something else):
This is not ideal, but it works for me in some situations. Cheers,
Albert.
Comment #37
rickvug CreditAttribution: rickvug commentedA suggestion around machine names - what about simply using the content type and enforcing that there can only be once custom breadcrumb rule per content type? At the moment (using D7-1.x) I can create multiple rules per content type, which is a bit pointless seeing as how I'd only want the one. Most features are built around a content type so this mapping should be natural. If this isn't workable then the best thing to do would be to change bid to machine_name, with the upgrade path creating machine_name from bid+node_type. Drupal 7 FAPI supports machine name as a special field so the fancy auto generation from the title comes for free.
Comment #38
theapi CreditAttribution: theapi commentedI see that new features are not being added to 7.x-1.x, but here's a patch to add Features to 7.x-1.x incase somebody wants it.
Comment #39
theapi CreditAttribution: theapi commentedActually use this patch not my previous one.
Comment #40
rickvug CreditAttribution: rickvug commentedI haven't had the time to do a full review of the changes in #39. One area that still needs work and discussion is the upgrade path. A few issues:
Overall I really like the direction of the patch. Providing machine names and using ctools for exportability is certainly the way to go. Some feedback from the Custom Breadcrumbs maintainer would be valuable at this point.
Comment #41
rickvug CreditAttribution: rickvug commentedComment #42
jamiecuthill CreditAttribution: jamiecuthill commentedThe _custom_breadcrumbs_load_for_type function should load conditions, not names.
Comment #43
Jan van Diepen CreditAttribution: Jan van Diepen commentedI needed features integration for a project. The project is still on drupal 6, so I created a patch for Custom Breadcrumbs and all of its sub-modules on 6.x-2.0-rc1. I had to make some changes to the database schemas, so be sure to run update.php after patching. To use it you need to have the features module installed. It uses the standard features hooks.
Copy the patch to the custom_breadcrumbs directory and run the following command:
patch -c -p 1 < custom_breadcrumbs_features_integration_6_x_2_0_rc1-579690-43.patch
Now run the database update.php script.
Either from your browser (you need to be logged in as admin).
or from the command line using drush from your drupal root:
drush updb
If you have any custom breadcrumbs defined, navigate to Site building >> Features on your website and select Create feature.
On the form that appears in the Edit component select list a number of Custom Breadcrumbs components will show up depending on the type of the custom breadcrumbs you have defined on your system.
Comment #44
brunorios1 CreditAttribution: brunorios1 commentedsubscribing
Comment #45
Cyberwolf CreditAttribution: Cyberwolf commentedSubscribing.
Comment #46
jason.fisher CreditAttribution: jason.fisher commentedPatch almost applies to dev. All except taxonomy:
Comment #47
goldlilys CreditAttribution: goldlilys commentedSubscribing. For d7 also if possible.
Comment #48
Jan van Diepen CreditAttribution: Jan van Diepen commentedThanks for the feedback jason.fisher!
Hope you did not miss that the patch is for 6.x-2.0-rc1.
Let me find some time to post a new patch for dev one of these days.
Comment #49
Jan van Diepen CreditAttribution: Jan van Diepen commentedHere's the same patch on dev.
Use:
patch -c -p 1 < custom_breadcrumbs_features_integration_6_x_2_0_dev-579690-49.patch
Remember it will works on the current (29 November 2011) dev release.
Any changes made to dev might invalidate it.
Comment #50
Snugug CreditAttribution: Snugug commentedDoes anyone have a version of this patch for D7?
Comment #51
wizonesolutionsHey @goldlilys, you can use the Follow button in the top-right now instead of typing a subscribe comment. Enjoy :)
Comment #52
Tarch CreditAttribution: Tarch commentedHi,
I have encountered a little problem with the patch for 6.x-2.0-rc1.
The problem is in here
The query for the panels should be:
Thank you,
Tarch.
Comment #53
Tarch CreditAttribution: Tarch commentedHi,
attached you find the patch with the correction of the bug I reported plus the replacement of a couple of dashes that should be underscores.
and
in both cases the dash after 'breadcrumbs' is meant as a subtraction for PHP.
Tarch
Comment #54
Jan van Diepen CreditAttribution: Jan van Diepen commentedHi Snugug,
I created a first go at a patch for the 7.x-2.x development branch.
Let's all hope it makes it into the next release.
To apply the patch, follow the instructions on http://drupal.org/node/1054616
Hope you can give it some testing. Do not forget to run update.php.
This upgrade is sponsored by Unicef Uganda for the Devtrac project.
Comment #55
lucor CreditAttribution: lucor commentedUpdated the patch in #54 to handle feature import in a clean drupal installation.
Comment #56
lucor CreditAttribution: lucor commentedFixed machine_name generation on creation
Comment #57
bitkid CreditAttribution: bitkid commentedI can't get this patch to apply.
The problem seems to be, that the patch wants to work on line 8 of the .info file, but the correct line is 7. (line 159 of the patch).
Is there something that I should have done before applying this patch?
Comment #58
lucor CreditAttribution: lucor commentedIt seems corrupted. I've uploaded a new version. Let me know if now works.
Comment #59
xtfer CreditAttribution: xtfer commentedUpdated the patch in #49 by Jan van Diepen, for 6.x-2.x-dev.
Changed:
- Works against Dev current as of 4.12.11 (patched against commit #f6ee1aa)
- Fixed an issue with the length of machine name unique keys (reduced to 255 chars for InnoDb compatibility)
- Removed some extraneous .eclipse junk which had crept in
Leaving this at 7.x, however note this is a 6.x patch.
Comment #60
bitkid CreditAttribution: bitkid commentedIt is much better now. The patch applies without errors now. Thanks.
I couldn't get the import working when I tested it, but I will do some more testing of it today or tomorrow.
Comment #61
bitkid CreditAttribution: bitkid commentedWhen trying to add my feature to another system, the import of the feature fails.
In the _set_data methods of the submodules (like panels and paths) the insert is only run if the delete actually deletes something. Therefore I never get anything into the database. If I remove the check on $result, the data is stored perfectly. Is there a good reason for having that check?
Comment #62
lucor CreditAttribution: lucor commentedI've the same behaviour reported in #61. Modified the code as reported below and works fine.
Comment #63
bitkid CreditAttribution: bitkid commentedHere is a patch Fixing the problem mentioned in 61 and 62. Fixed in all submodules.
NOTE: This patch was created against the git version (commit 0b50c14), not the tar.gz version and it will fail to patch the .info files on that version.
Comment #64
bitkid CreditAttribution: bitkid commentedoh no... I did wrong... shame on me...
Here is the correct patch. Sorry about that.
Comment #65
SuleymanK CreditAttribution: SuleymanK commentedGreat work.
unfortunately custom_breadcrumbs for views and paths are not exported correctly. The array keys in features.inc are negative integer values like -1311865374. After wrapped this array keys with '-1311865374' it reverted fine.
Comment #66
realityloop#39 used update_sql which no longer exists in D7
This is a git patch against 7.x-1.0-alpha1
Comment #67
mikemadison CreditAttribution: mikemadison commentedThe good news: As far as I can tell, the patch in #66 applies cleanly, and Features now shows me a custom breadcrumbs export option. Hooray.
The bad news: The custom breadcrumbs module itself now won't load and the landing page gives me a WSOD. Booo!
In digging through my logs a bit, nothing is tripping in the Drupal side of the house. PHP error logs show that the custom breadcrumbs module is now throwing a "drupal undefined function ctools_export_crud_load_all" error in custom_breadcrumbs.module at line 182.
I did a bit of digging and this is an older issue, but seems relevant: http://drupal.org/node/1104536
If i include the following in my code, the error goes away and the module page itself will load now (and I can still export the breadcrumbs). Sounds like progress!
From Features, when I start exporting the custom breadcrumb, it automatically dumps a ton of Strongarm variables in that I don't understand. Is anyone else seeing this behavior? (e.g. node_options, node_submitted, comment_preview, etc.)
As far as I can tell, the custom breadcrumbs apply smoothly when you import the feature.
Nice work all! As long as the strongarm stuff doesn't concern anyone, I would just suggest re-rolling the patch in #66 to include the ctools_include above to ensure that others don't run into the error that I did.
Comment #68
mikemadison CreditAttribution: mikemadison commentedActually, it looks like the ctools_include should be included in all functions where custom breadcrumbs tries to return the ctools_export family of functions.
Comment #69
colanAs per:
Comment #70
vinmassaro CreditAttribution: vinmassaro commentedThrowing in my 2 cents so we can hopefully get some life in this issue. The patch in #66 applies cleanly for me to 7.x-1.0-alpha1 and exports breadcrumbs into my feature correctly. I did not encounter any of the issues experience by lalweil in #67 - no white screens with CTools 7.x-1.0 and no Strongarm variables being added.
Comment #71
realityloopmarking this as needs review again in light of vinmassaro's comments
Comment #72
realitylooplalweil: can I suggest you turn on error reporting and let us know what actually caused your WSOD, also could you let us know what version of PHP you are using please?
Comment #73
mikemadison CreditAttribution: mikemadison commentedI'm running PHP 5.3.3.
The error was pretty much what I paraphrased above:
Fatal error: Call to undefined function ctools_export_crud_load_all() in /var/www/html/drupal/sites/all/modules/custom_breadcrumbs/custom_breadcrumbs.module on line 184
Comment #74
vinmassaro CreditAttribution: vinmassaro commented@lalweil - are you running the latest CTools? Undefined function error sounds like the module wasn't enabled. Is it possible you were trying to enable the Feature without this module installed or as a dependency of your feature?
Comment #75
mikemadison CreditAttribution: mikemadison commentedYou know, I thought that might have had something to do with it. I am running CTools 1.2 and made sure that the Bulk Export component was enabled.
I didn't get far enough to actually export a feature, as soon as I applied the patch I could no longer load custom breadcrumbs in the Drupal UI. So, to reiterate, the Features integration looked fine, but for some reason the CTools stuff was throwing errors, breaking Custom Breadcrumbs itself.
Currently I've patched my local installation to do the ctools_include() function throughout, and it has resolved my problem. It would be great to figure this out though so upgrading is easier in the future, and other folks won't have the same problem.
Comment #76
vinmassaro CreditAttribution: vinmassaro commentedI have not run into the issues in #75, can anyone else report if they are seeing this problem? Would be great to get this moving and into 2.x since there is Views support there.
Comment #77
mrfelton CreditAttribution: mrfelton commentedUpdated patch slightly - the previous ones use a bit of a strange export style, and features constantly detects them as overridden. This version properly keys the export items by their machine name.
Comment #78
colanThis will need a re-roll for the latest dev. custom_breadcrumbs.install will need to be updated for sure.
Marking #1821928: Custom breadcrumbs views not exportable, features.inc empty as a duplicate of this issue.
Comment #79
mrfelton CreditAttribution: mrfelton commentedUpdated patch
Comment #80
liquid06 CreditAttribution: liquid06 commentedThe patch in #79 didn't work for me. :(
I got custom breadcrumbs 7.x-2.x on site A, applied the patch and then created a feature. I installed the same patched version of custom breadcrumbs on site B, then copied my feature to site B and enabled it.
The feature refused to revert on site B, showing a bunch of warning messages when I tried to revert from the UI.
Comment #81
fluffy CreditAttribution: fluffy commentedpatch at #79:
Performed update: custom_breadcrumbs_views_update_7000 Invalid argument supplied for foreach() custom_breadcrumbs.install:237
Does not add machine_name's to existing breadcrumb definitions, manually saving the definition gets the machine_name.
There is no way to set your own machine_name?
The same problem as #80, the Feature stays in overwritten mode and refuses to revert.
Comment #82
kemsnake CreditAttribution: kemsnake commentedfix #79 patch. remove execute() after db_query
Comment #83
fluffy CreditAttribution: fluffy commentedthe patch #82 fails to apply:
fatal: git apply: bad git-diff - expected /dev/null on line 4
because the patch file is in Windows format, I tried to change that to Unix but that did not help:
fatal: corrupt patch at line 1821
Comment #84
vinmassaro CreditAttribution: vinmassaro commentedHere is a copy of #82 that works. Please test! :)
Comment #85
danylevskyivinmassaro, thanks for your work!
Currently Drush can't apply patch listed in make file. :(
Comment #86
vinmassaro CreditAttribution: vinmassaro commented@danylevskyi: are you patching against 7.x-2.x? The patch works for me:
Comment #87
danylevskyi@vinmassaro, yes I am patching against 7.x-2.x with drush make.
Comment #88
vinmassaro CreditAttribution: vinmassaro commented@danylevskyi: the patch applies to 7.x-2.x HEAD, not 7.x-2.x-dev, so you will need to test it against HEAD.
Comment #89
fengtanI tested #84 against HEAD. Creating the feature is fine, but I had some issues when reverting it. All fields of reverted breadcrumbs contained the 1st letter of their initial value (eg. if the breadcrumb name was 'my bc', then the reverted name would become 'm').
The issue could come from
_custom_breadcrumbs_config_set_data($item)
using$values[0][XXX]
instead of$item[XXX]
.Attached is my try to fix the problem, if it helps.
Testing plan:
git clone http://git.drupal.org/project/custom_breadcrumbs
cd custom_breadcrumbs
patch -p1 < custom_breadcrumbs_features_integration_7_x_2_x_dev-579690-89.patch
drush updb (run update.php)
drush cc all (clear caches)
Comment #90
fengtanI found a few other issues when testing #84:
I rolled a new patch to be applied against 7.x-2.x, which should fix these problems.
If anyone is up for reviewing/testing it, help yourself. Attached is also a screenshot of how it should look like.
Thanks
Testing plan:
git clone --branch 7.x-2.x http://git.drupal.org/project/custom_breadcrumbs.git
cd custom_breadcrumbs
patch -p1 < custom_breadcrumbs_features_integration_7_x_2_x_dev-579690-90.patch
drush en custom_breadcrumbs custom_breadcrumbsapi etc
(enable all custom_breadcrumbs modules)drush updb
(run update.php)drush cc all
(clear caches)admin/structure/custom_breadcrumbs
Comment #91
colanThanks for working on this. Here's my commentary after reviewing the code:
(1) I'm seeing a lot of hook implementation headers like this:
These should be rewritten like "Implements hook_help()." as per https://drupal.org/coding-standards/docs#functions. There is no "[component_hook]".
(2) There are several function headers like:
...where there is missing documentation on parameters and return values.
(3) These types of comments don't follow the coding standards:
+ //loop over the items we need to recreate
(4) This needs to be fixed before we put this in:
So nothing major, but I'd still like some more folks to test it. Ideally, we'd get some automated tests with this, but if we don't, it won't be a showstopper (given enough feedback to ensure that this doesn't break anything).
Comment #92
realityloopNeeded a reroll for myself. Fixed all the 1's while I was at it.
Comment #93
realityloopTesting this on a site I'm working on now I get the following error when tying to enable the feature that I had done export with on a fresh install:Edit: this was another issue with my feature, the custom breadcrumbs are being succesfully exported and imported via features
Comment #94
vinmassaro CreditAttribution: vinmassaro commentedReviving this for review.
Comment #95
subhojit777Patch in #90 not working. All settings are lost after revert.
Comment #96
fengtanMaybe this module can help: https://drupal.org/sandbox/Fengtan/2122727
It re-uses the patch of this issue but can be applied to stable releases of custom breadcrumbs (not only 7.x-dev or HEAD) while the patch is being reviewed/tested.
We added a machine name UI and some tests. Hopefully we can re-use some of them for this patch.
@subhojit777: a new bid used to be generated when reverting a crumb. Your settings probably didn't disappear but have been assigned a new bid. We fixed this in the module mentioned above. Maybe we can also port the fix in the patch as well.
Comment #97
rj CreditAttribution: rj commentedSandbox module in #96 works for me. Thanks, this is great.
Comment #98
revagomes CreditAttribution: revagomes commentedThe custom_breadcrumbsapi.features.inc file is missing in the #92 patch.
Comment #99
fengtanThe sandbox module has been turned into a full project. Might be of interest: https://drupal.org/project/custom_breadcrumbs_features
Comment #100
chrisgross CreditAttribution: chrisgross commentedcustom_breadcrumbs_features works great. any chance of getting it merged?
Comment #101
colan@chrisgross: Absolutely! As soon as all of the problems mentioned in #91, #95, and #98 are fixed. Feel free to provide a patch that folks can test.
Comment #102
xmacinfoAny updates?
Comment #103
fengtanWe have been using this module on production for 5 years on a large multisite installation: https://www.drupal.org/project/custom_breadcrumbs_features
So far so good... I have not received any bug report in 5 years and 1,200+ sites report using it.
Comment #104
xmacinfoYes! But the module page states:
Will be supported until this issue is fixed:
#579690: Features Integration (machine names, import and export via ctools)
Hence my question. :-)