Suddenly, when trying to edit content via the IPE, I get a spinning gear and this in my dblog:
Notice: Undefined index: clicked_button in panopoly_magic_form_ctools_entity_field_content_type_formatter_options_alter() (line 885 of /home/content/71/5652771/html/sites/all/modules/panopoly_magic/panopoly_magic.module).

Any thoughts?

CommentFileSizeAuthor
#1 content_editing_error-2307831-1.patch2.77 KBmglaman

Comments

mglaman’s picture

Title: Content editing error » Using deprecated clicked_button, not triggering_element
Status: Active » Needs review
StatusFileSize
new2.77 KB

Currently Panopoly magic is checking that line via

(!empty($form_state['field_instance']) && $form_state['clicked_button']['#value'] == 'Back')

Throughout the module there is deprecated clicked_state. Here is a patch updating and hopefully resolving watchdog notice. See: #1059402: Replace $form_state['clicked_button'] with $form_state['triggering_element']

Iceabenezer’s picture

Thanks for the patch mglaman. I applied it, but it didn't have any effect, and I still can't edit the content. The strange thing is, the only piece of content I can't edit is the "body" field of any panelized page. Any thoughts?

dsnopek’s picture

@Iceabenezer: Have you looked in your webserver or PHP log? Or in the JavaScript console? It sounds like something somewhere is erroring out, and having the error message would be very helpful in tracking it down.

dsnopek’s picture

I found a change record that supports the idea that clicked_button and triggering_element can be used the same. It's for Drupal 8, but it mentions that the change is safe in both Drupal 7 and Drupal 8:

https://www.drupal.org/node/1814186

I also found a reference on rfay's blog:

http://randyfay.com/content/form-api-changes-drupal-7-part-1-formstate-c...

It's crazy how little documentation I can find on the values of $form_state! Anyway, just wanted find some definitive information on this change. I'll review the patch soon!

  • dsnopek committed 364916f on 7.x-1.x
    Update Panopoly Magic for #2307831 by mglaman | Iceabenezer: Fixed Using...
dsnopek’s picture

Status: Needs review » Fixed

Tested by switching "Live Preview" to "Manual" and it works great, thanks! Commit.

Status: Fixed » Closed (fixed)

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