Using panoply-dev. Tried using -dev version of this, no change

Anyhow, when trying to save a default for a node type from a node of that type, I get this

This will save this configuration as the new default for all entities of this type. This action cannot be undone. Are you sure?

About 5 times before it actually saves.

Comments

gmclelland’s picture

Title: Repeatially asked to confirm when saving node » Repeatially asked to confirm when trying to save a default for a node type

I was getting the same thing until I disabled the http://drupal.org/project/entitycache module. I'm not sure what is causing the problem.

Hopefully that helps provide more information.

hefox’s picture

not using that

This is a bandaid patch. Something is calling attach way more than once on #panelizer-save-default. When removing a pane, problem doens't happen, but when editing or adding a new one, bam, tonnns of re-attachments.

hefox’s picture

Status: Active » Needs review
dagomar’s picture

I am under the impression that each action creates an extra confirmation message.

By the way, the patch works.

damienmckenna’s picture

Issue summary: View changes
Status: Needs review » Needs work

I think it'd be worth having someone with good JS chops taking a look at this - there doesn't seem to be any point in adding a bandaid for the problem when there's a root issue of the JS being executed too many times.

mglaman’s picture

Status: Needs work » Needs review
StatusFileSize
new1.63 KB

Drupal provides the .once() plugin for this purpose, so we don't have to run on attach and detach. It works by taking the first argument as a class name. Once this has run it adds CLASSNAME-processed to element to prevent multiple binds.

damienmckenna’s picture

StatusFileSize
new1.45 KB

Rerolled.

The last submitted patch, 6: repeatially_asked_to-1982654-6.patch, failed testing.

damienmckenna’s picture

Status: Needs review » Fixed

Committed. Thank you both!

  • DamienMcKenna committed 2bda3f9 on 7.x-3.x authored by hefox
    Issue #1982654 by hefox, DamienMcKenna, mglaman: Repeatially asked to...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.