Wednesday 22 May 2013

Bored to death


I've met an old friend today. His name is Click. Click the Hell out of You. When you tell the customer they have user roles, out of the box built into the system, they go crazy. They create roles for everything. One role exclusively for Roger, obviously. One for RogerWhenDrunk, with limited administrator access. And RogerAfterPromotion with extended content authoring. Because we all believe in future.


And then you have a nice permission admin page with over 9000 checkboxes. What I'm missing at this point is a JS plugin that lets me to draw with the checkboxes. And just to inform you - in case you decide to change user roles in the future. So roles are identified by their names in a feature. It means when you change the name of the role and save it in a feature - you just define new ones. Simply because features doesn't know how to remove the old one. Drupal does a little job, when you rename one it also replaces in the permission table, so at least your privileges are stable. One lesson learned, never same roles in a feature. You can, but then you need to maintain the full crud from an update hook.

One trick I've realized also - well, it's a save, not a trick. Front page - the sneaky fellow - tend to cover himself as an empty string in some cases. When you create a context, and use a menu item that is mapped to '' - then you basically tell the context to map to ''. It will result that your context is always gonna be applied. Solution is easy - although not too smart - use the exact path, not the token. The only problem is when you change the front page path and want the menu to track the update.

And finally let me talk about my second deadly fear. (Yeah, the other one is women.) It's the Drupal issue queue. I thought I beat him this time, and yet I failed miserably. So the eternal question - how to contribute back to D8Core without spending our lovely adolescence in a never-ending comment thread? Then it stroke me - sort by reply number. Simply look for bugs, tasks or any pervert category and sort it so you see new items with no work started. First I went to bugs, thinking that it's gonna be easy. Well, nah. A clean bug report is vague. Random. Mysterious. So I went to see tasks. Tasks are - on the other hand - either part of a huge monster issue, or you just now sure if you really have to do it. It's like giving birth to your first child who is already expelled from school, drog addict and having an affair with southern chicken. I just wish I would be a smart man.

---

Peter

No comments:

Post a Comment

Note: only a member of this blog may post a comment.