Closed (fixed)
Project:
Panopoly
Version:
7.x-1.x-dev
Component:
Magic
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
20 Jan 2015 at 16:14 UTC
Updated:
4 Feb 2015 at 21:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
chewie commentedComment #2
chewie commentedComment #3
chewie commentedComment #4
chewie commentedComment #5
chewie commentedComment #6
dsnopekThanks!
Please refrain from including whitespace or coding style fixes in unrelated code. While we'd like to fix these issues one day, committing this could prevent other patches to panopoly_magic from applying. Once the number of open patches is low enough, we'll make a "coding style pass" and fix all these issues at once. :-)
Comment #7
chewie commentedComment #8
chewie commentedComment #9
chewie commentedComment #10
chewie commentedComment #11
chewie commentedComment #12
chewie commentedComment #13
dsnopekHrm. Unfortunately, I don't think that array key is ever going to be empty, so that code will never run. :-/
Also, I'm not entirely sure that code is necessary in the first place because the panels_ipe is already setting that button title to "Customize this page". The second one is necessary because the default is "Change layout" (without "this").
However, if the goal is for your preprocess function to take precedence over panopoly_magic's, you can reorder the preprocess functions using
hook_theme_registry_alter():https://api.drupal.org/api/drupal/modules%21system%21system.api.php/func...
By doing that in your module, you can avoid patching Panopoly all together!
Comment #14
dsnopekI tried to track down the reasoning for that preprocess function and it comes from the initial commit of panopoly_magic. I'll e-mail @populist to see if he remembers why that's there, but personally, I'd be for removing the function entirely! All it does is add a "this" to "Change this layout", which is a suspect change at best. :-)
Comment #15
populist commentedI believe that function was added by the chief (@merlinofchaos) as part of an effort to make the IPE bar more themeable - https://www.drupal.org/node/1249332. We added the function to Panopoly Magic to match the original designs.
No worries from me if we want to remove the logic to make Panopoly more extendable, as long as the default labels are human friendly.
Comment #16
dsnopekThanks, @populist!
Yeah, the default labels are almost the same except "Change this layout" is "Change layout" which I think is totally fine. Here is a patch that removes the preprocess and lets the default labels shine through! I'll make sure our automated tests still work and then commit.
Comment #17
dsnopekHere's the Travis-CI build:
https://travis-ci.org/dsnopek/panopoly/builds/47827626
Comment #19
dsnopekTests passed! Thanks to @Chewie for pushing this and @populist for the background info! Committed. :-)
Comment #20
dsnopekMoving to Panopoly issue queue... Not sure how this got here!