Attempting to save a panel through the IPE cannot be accomplished because the ajax event is not attached to the button. Overriding theme_button to produce an "input" type instead of a "button" seems to have given me a temporary solution.
(@rerooting edit) : Reference for Panels Contributors - we feel that the panels IPE buttons should be made more element agnostic as the HTML5 standard is calling for the replacement input[type="submit"] elements with elements.
| Comment | File | Size | Author |
|---|---|---|---|
| #42 | reroll-2120849-42.patch | 7.63 KB | kolier |
| #34 | panels.zip | 412.59 KB | hkirsman |
| #27 | interdiff-2120849-18-27.txt | 4.03 KB | mkhamash |
| #27 | panels-ipe-save-2120849-27.patch | 7.86 KB | mkhamash |
| #5 | panels-ipe-save-2120849-5.patch | 6.85 KB | rerooting |
Comments
Comment #1
rerooting commentedI followed your example and rolled a patch that fixes this and sets up an array for other button element ids that need to be inputs. It's a bit expensive but will work for now. I wonder if theres already a patch for panels that ameliorates this issue.
Comment #2
markhalliwellBootstrap modifies theme_button() to actual use the modern HTML5
<button>tag. This allows for consistent x-browser styling compatibility. We won't start adding these kinds of "exceptions" into Bootstrap. They should be changed at the source where the actual issue lies: Panels (http://drupalcode.org/project/panels.git/blob/refs/heads/7.x-3.x:/js/dis...)Change from:
to:
Comment #3
markhalliwellBootstrap modifies theme_button() to actual use the modern HTML5
<button>tag. This allows for consistent x-browser styling compatibility. We won't start adding these kinds of "exceptions" into Bootstrap. They should be changed at the source where the actual issue lies: Panels (http://drupalcode.org/project/panels.git/blob/refs/heads/7.x-3.x:/js/dis...)Change from:
to:
Comment #4
rerooting commentedGood lookin out, I figured that it would look something like this. I'm working on a patch for panels that fixes the dependency where you mentioned and in a handful of other places, but it doesn't look like it's taking. I'll check in once it's good and ready.
Comment #5
rerooting commentedHeres an incomplete patch for panels, however because of some weird issues I'm having with cacheing I can't for the life of me get the panels_ipe.js script to load with the changed selectors. Speaking of which, the change at 218 could use a more creative selector as well. So yeah, can't confirm this works yet.
Comment #6
rerooting commentedFYI, if anyone is still having this issue with the bootstrap theme, the #1 patch applied to the bootstrap theme is a temporary workaround until a more sustainable solution is reached with a patch to panels. It is currently the only working patch.
Comment #7
markhalliwellNo, the patch from #1 shouldn't be used. Use patch #5.
Comment #8
rerooting commentedWhat I'm saying is that the #5 patch is untested, and #1 is a temporary workaround until I or someone else can confirm that #5 works.
Comment #9
rerooting commentedI'll give the automated testing a try against the patch in case there are client side tests
Comment #10
markhalliwellhttps://drupal.org/node/1887918#closing
The patch in #5 converted all the CSS selectors to use IDs instead of their respective classes. This is not best-practice.
Comment #11
rerooting commentedThanks for the tip! Currently very busy and the first patch, although it is a total hack, it is serving the purpose of allowing me to build a site with IPE and bootstrap and to iterate some style plugins for a specific project with a tight timeline.
I'll come back and finish this up later in the week.
Comment #12
rerooting commentedWarning: do NOT use the #5 patch as Mark instructed. Just tried it. There is still a lot more work to do. Unfortunately I don't have time and am just patching bootstrap to get around it. My client could care less if its an input or button element, especially on the backend. I do care, but I don't have time to go down the rabbit hole on this one. I would prefer to have the participation of folks from panels but I don't see them jumping on this one.
Comment #13
markhalliwellComment #14
adamsro commented#13 is working for me. Thanks Mark, thanks rerooting.
Comment #15
rerooting commentedReally?Thats actually #5, the one I wrote that wasn't working for me! Congrats! haha. With everything - styles, layout, save, cancel, etc? Is the button css working (i.e. are the icons working)? In that case, I'll give it another quick test and make some more css standardization fixes. I was inches from giving up on this!
Comment #16
adamsro commentedYup! Button styles correctly applied and JS events attached. Everything is working as expected for me, thanks! Insidious those caching issues are.
Comment #17
rerooting commentedOk finally a working patch! Awesome, thanks for everyone's help on this. Let me know if it needs any changes for standardization purposes, but I believe we can consider this RTBC, thus a candidate for a commit
Comment #18
rerooting commentedOh hmmmm... I guess I could be more creative about the jquery selectors at line #133 (panels_ipe.js line 218). But besides input or button, what else would they be? This seems to be the most performant means to handling ajax processed elements, unless I'm overlooking something.
Comment #19
rerooting commentedComment #20
rerooting commentedThis is our best bet for applying the css.
Comment #21
markhalliwellComment #22
japerryNeeds a few more eyes on it before we can commit. I'll see if I can reproduce and test after other RTBC issues are resolved. If others can test this and verify its functionality, that'd be great!
Comment #23
lelizondo commentedPatch in #20 working for me.
Comment #24
jkswoods commentedPatch in #20 worked for me. I was using bootstrap and panopoly together, which don't seem to work well with each other as of yet. But the patch definitely fixed the save / cancel buttons on the IPE
Comment #25
markhalliwellChanging title to something that actually describes what this patch does. Also, I don't think the elements were that religious to begin with :-p
Comment #26
markhalliwellMoving back to RTBC per #23 and #24.
Comment #27
mkhamash commentedThe patch in #20 does work, but it does break buttons background CSS, and use first child selector to select inputs in .panels-ipe-control container which I think is not necessary.
Comment #28
markhalliwellAh, great catch! Even I missed that one. Agreed, using child specificity is rarely needed (
>) in CSS.Comment #29
joelstein commentedThe patch in #27 works for me. I'm using Bootstrap theme 7.x-3.x-dev, and without this patch, IPE is broken. Can we get it committed?
Comment #30
jkswoods commentedThe patch in #27 works over here aswell. I've been waiting for this one to get committed for a while so panopoly can finally work great with bootstrap.
Comment #31
rerooting commentedGood catch on that adjustment to the css! I'm not sure why I chose child selectors, I think there was something going on where some of the button classes were re-used on multiple elements, but everything appears fine.
Before we commit it, let's just make it clear what this patch does for the panels team in general: It allows themes to use the more modern HTML5 compliant approach of using a
<button>element instead of<input type="submit">element. This is not just a patch for bootstrap interoperability, but a patch that will give theme developers the option of adopting more contemporary standards without breaking IPE.Comment #32
markhalliwellNot HTML5 specific. I don't know what I was thinking that day.
<button>elements have been around forever. Maybe I was just thinking it because they're becoming more readily/appropriately used in HTML5 markup.Comment #33
Knarf31 commentedCould someone please provide the patched files from #27 for me?
I don't have a clue how to patch on win7 :-(
Thanks in advance.
Comment #34
hkirsman commentedSweenyy, I've added patched version of Panels 7.x-3.4
Comment #35
hkirsman commentedCould somebody check what happens if you try to edit same thing multiple times. For me first save is ok, then if you edit something again, ckeditor won't activate and for third try the modal is empty.
Comment #36
k_zoltan commentedTested #27 using simpletest.me
Added patch
Installed bootstramp theme
enabled page manager
enabled panels IPE
created a test panel and used the IPE
Works like a charm.
Would be great if we could get this committed since everyone who is using a bootstrap based theme will get stuck in this.
Comment #37
joshmillerAlso confirm that with latest dev this patch fixes the IPE problem on bootstrap. Now a part of our make file.
Thanks!
Comment #39
Håvard commentedWorks like a charm :-) Hoping for a commit soon....
Comment #40
rerooting commentedJust re-applied after upgrading panels using the patch in #27 on the same project that originated the first patch :) works great! Time to commit it!
Comment #41
jkswoods commentedI agree with @rerooting, let's get this committed! Also, I too can confirm the patch in #27 is still working.
Comment #42
kolier commentedAs patch #27 fail the patch in /panels_ipe/css/panels_ipe.css, the reroll patch should work on the latest 7.x-3.x branch.
Git repo: https://github.com/drupal-issue/panels/tree/2120849
Comment #43
deepakaryan1988+1 for #42 Patch. Worked for me!
Comment #44
chertzoganother +1
Comment #45
joelpittetbig +1 to RTBC, thank you!
Comment #46
arosboro commented+1 for #42
Comment #47
Håvard commented#42 works nicely, though it would be practical for many if it was mentioned that this patch is aimed for the dev-version.
Comment #48
boyan.borisov commented+1 for #42
Comment #50
japerryOkay the overwheming support seems to be good here, Committed in dev!