I'm receiving this error when I trying to export page manager "Configuration page_manager_handlers.page_register_landing_page_panel_context is broken."

I think it's because the page manager handler is exporting the file in this format: page_manager_handlers.page_register_landing_page__panel and the page manager page is trying to use the dependency on this format page_manager_handlers.page_register_landing_page_panel_context

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

guilopes created an issue. See original summary.

guilopes’s picture

Version: 7.x-2.x-dev » 7.x-2.0-alpha3
guilopes’s picture

Version: 7.x-2.0-alpha3 » 7.x-2.x-dev
guilopes’s picture

Sorry, on dev version it's solved

guilopes’s picture

Status: Active » Closed (won't fix)
guilopes’s picture

guys, it's a bug,

To reproduce this, download the ctools 1.9, download last version of panels. Create an panel page, export panel page and panel handler, Tracking it on configuration and try to sync configuration, you will receive this error.

I fixed it on this patch

guilopes’s picture

Status: Closed (won't fix) » Needs review
drupal-son’s picture

Same issue.
Patch worked for me.

Is there a list of patches or a single cumulative patch that reflects the latest working version for this module?
I'm pushing hard trying to replace features modules with this one into the company.
I need to make sure this module works for almost all entities we are used to work (views, panels, commerce, any kind of fields, flags, rules, any other used contributed module).

Thanks.

guilopes’s picture

Current this patch is not added to the develop branch, we need wait the mantainer of module add it

jusfeel’s picture

But how does this patch provide backward compatibility - it basically changes the logic. I have the site filled with panels that using _panel_context, now ctools page manager is using "__panel" - the old panels will break if I stop tracking and try to to track again .

guilopes’s picture

@jusfeel, which version of Ctools was you using? I can provide backward if knew the version of ctools

Thanks

jusfeel’s picture

7.x-1.9 that would be cool.

jusfeel’s picture

I actually created a patch on panels for the time being for sites/all/modules/panels/plugins/task_handlers/panel_context.inc so it will keep giving me the correct machine name CM can find.

*** 840,848 ****
   * Submit handler for general settings form.
   */
  function panels_panel_context_edit_settings_submit(&$form, &$form_state) {
-       $machine_name =  $form_state['handler']->task . '_' .  $form_state['handler']->subtask . '_' .  $form_state['handler']->handler;
-   $form_state['handler']->name = $machine_name;
-
    $form_state['handler']->conf['no_blocks'] = $form_state['values']['no_blocks'];
    $form_state['handler']->conf['body_classes_to_remove'] = $form_state['values']['body_classes_to_remove'];
    $form_state['handler']->conf['body_classes_to_add'] = $form_state['values']['body_classes_to_add'];
--- 840,845 ----
ropic’s picture

The patch doesn't work for me, i think the problem is:

The page handler cannot be generated manually, it's already on database "page_manager_handlers" and also consider each page can have one or more handlers.

My fix on alterDependencies:

if ($config->getComponent() == 'page_manager_pages' && !$config->broken) {
      $config_data = $config->getData();
      $page_handlers =  page_manager_load_task_handlers(array('name' => 'page'),$config_data->name);
      foreach(array_keys($page_handlers) as $id){
          $id = 'page_manager_handlers.' . $id;
          $page_handler = ConfigurationManagement::createConfigurationInstance($id);
          $page_handler->build();
          $config->addToDependencies($page_handler);
      }
    }