Active
Project:
Panels
Version:
7.x-3.x-dev
Component:
In-Place Editor (IPE)
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Apr 2012 at 03:40 UTC
Updated:
4 Nov 2016 at 11:55 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
denny84 commentedYes I have the same problem. Even if you dont add any content and plainly hit the "save" button, the ajax causes everything to go blank. I am using 7.x 3.2 version and not the dev.
Comment #2
denny84 commentedOk let me clarify a bit on my comment.
If you add any custom content from IPE, then everything is fine. However as you start adding things like fields, comments etc then you see these things getting disappeared after hitting "save" button. The custom content remains untouched, but everything else disappears. I hope I am clear.
Comment #3
overtune commentedYes, I have the same problem.
I have activated the "node_view" page. When I select "Customize this page" and then hit "save" the node content disappears.
The
<div class="panels-ipe-portlet-content">After I have clicked "Customize this page" and saved, it becomes like this:
<div class="panels-ipe-portlet-content panels-ipe-empty-pane">Placeholder for empty ""Node being viewed" content"</div>I use Panels 7.x-3.2.
Anyone has some idea what this can be?
Thanks.
Comment #4
gooddesignusa commentedI was having the same issue until I upgraded everything to the latest dev.
ctools 7.x-1.0+22-dev (2012-May-21)
Panels 7.x-3.2+5-dev (2012-Apr-23)
I'm having a similar issue where panes are also going away but hitting refresh before edit fixes them. If I do not hit refresh before editing I also see the place holder text for an empty pane. Hitting save will totally remove those and a refresh wont bring them back. I explained more in detail on this post http://drupal.org/node/1572202#comment-6025588 which I think is related.
I think it has something to do with the panes refreshing / loading and because the url is different sometimes they dont get the correct information. Maybe something to do with context? Thats all over my head.
For example a views pane with a contextual filter set to the current NID using 'Provide default value': 'Content ID from URL' . This renders fine when viewing the node, but when your in the IPE it looks fine but when hitting save it goes away. I used dpm to see what was being passed to the contextual filter and it was blank after saving from IPE. Hitting refresh brought it back.
Comment #5
merlinofchaos commentedThis is weird.
The problem looks like it's not translating temporary IDs to permanent IDs upon save. But it's supposed to be. I'll have to dig into this more deeply.
Comment #6
eridolfi commentedI seem to be having this problem with version 7.x-3.2 as well.
Comment #7
David_Rothstein commentedIf people are seeing this with Panelizer enabled, then it sounds like it could be related to the issue mentioned above (#1572202: IPE changes aren't shown after second save without page refresh).
I was seeing something like that and debugged it for a while. Basically the issue turned out to be that for a newly-created panelized node, depending on your IPE configuration it is possible to have the node created (and ready to be used with the IPE) but without a record having been created in the {panelizer_entity} table yet (or without a complete record having been created).
When that happens and you click the "Save" button in the IPE, Panelizer's hook_entity_update() implementation will wind up saving the Panels display without modifying the entity itself to reflect that, but rather only modifying a cloned copy. It happens via this code in Panelizer:
Ultimately, through a complex series of objects which reference each other, this means that the IPE display object doesn't get updated either, i.e. in this code in Panels:
When panels_edit_cache_save() is called above (ultimately triggering Panelizer's hook_entity_update()), $this->display is never updated to reflect the new state of the system, and thus it gets returned to the client side without the new pane ID, ultimately leading to the disappearing content.
The attached Panels patch fixes the issue for me, though I'm not really convinced it's the right solution. (I looked for a solution inside Panelizer, but couldn't find a way to do it that didn't break other things; however, it's possible this is actually a Panelizer bug and should be fixed in #1572202: IPE changes aren't shown after second save without page refresh rather than here.) But here's the patch in case people want to check if it fixes the issues they're seeing.
Comment #8
merlinofchaos commentedHm. I happened across this one yesterday as well. Thanks for the patch, David, this at least gives me a place to start in figuring this one out.
Upgrading to major, this is a pretty big flaw. My suspicion is that is indeed a bug in Panels, not Panelizer, but I will just have to step through and see what's getting lost to be sure.
Comment #9
merlinofchaos commentedActually, I take it back; this is different than the issue I ran into myself. Even more fun!
Comment #10
merlinofchaos commentedThe problem here is that when it rerenders, that information (the content ID from the URL) isn't actually available. And there's no way to get that information to the pane, so I don't think that's even going to be fixable.
After some research, there are two separate problems here.
1) The one I saw yesterday is similar to what was reported here. After a save, the IPE forces a complete rerender. However, arguments are lost, so context derived from arguments revert to placeholder values. This is probably fixable, but I have to figure out how to preserve the argument information. However, as said above, I don't think there's anything I can do about things that acquire information directly from the URL. The workaround would be to try and acquire that information from context instead, but I realize that's not always possible.
2) What David Rothstein identified involves some pane IDs getting lost. However, I'm unable to duplicate that in a quick test (3 successive saves without reloads successfully added panes). However, there may be something special about going from a default panelizer to one that is freshly saved in the db that I haven't reproduced exactly. To that end I have an experimental patch that may fix it. Since that is a panelizer patch I'll post it in #1572202: IPE changes aren't shown after second save without page refresh and work that there.
Moving back to active; the NR patch here is probably not a true fix, and I'm handling that issue back in 1572202 anyhow, for now at least.
Comment #11
David_Rothstein commentedSee also #1621014-1: Contextual links and other JavaScript behaviors on panes don't work after clicking "Cancel" in IPE and subsequent comments, which appears to report something pretty similar. (That's another issue which, like this one, is about two different bugs that are easy to confuse because they have similar symptoms - maybe we need to do a bit of issue queue cleanup).
As I suggested there, would it be possible to fix these URL-related issues by faking $_GET['q'] when Ajax requests are made for the pane content?
Comment #12
merlinofchaos commentedFor item #1 in #10 above, I'll be handling that in #1772834: Panels IPE Save Drops Context Specified in Page Manager which should have a patch shortly.
#2 will be handled in #1572202: IPE changes aren't shown after second save without page refresh.
Comment #13
merlinofchaos commentedBoth of the items in #12 are fixed -- is there anything left in this issue? I don't believe so, but feel free to re-open if I'm wrong.
Comment #15
liquidcms commentedis this not the same issue as this: #2092447: ipe requires page refresh to properly show flexible layouts - which still exists with latest -devs of panels/ctools.
Comment #16
damienmckennaPlease don't reopen an issue just to ask if it's the same as something else. Thank you, though.
Comment #17
liquidcms commentedDamien, that was just how i word things.. i am pretty sure it is the same issue and therefore it is silly to open a new issue when this one is not closed. opening a new one loses the history of what has been done to date on the issue.
so basically get shit for re-opening and get shit for creating duplicates.. nice.. lol
but that's cool. i'll leave this closed if you guys aren't interested in getting this fixed.
Comment #18
damienmckennaliquidcms: There's no reason to take an attitude. If the problem still exists then sure, reopening it is fine, but also then close the other one so there's only one issue per topic.
Comment #19
damienmckennaFrom liquidcms in #2092447: ipe requires page refresh to properly show flexible layouts:
Comment #20
damienmckennaTagging for easy reference.
Comment #21
seanrI've got this issue currently, with latest versions of everything and it's definitely not fixed. To clarify, I have to reload the entire page after every IPE save to see the content.
Comment #22
joelstein commentedSee #2824874-2: Fake path for better context when rendering panes with IPE which fakes the path to provide better context when rendering panes.