Panels IPE when used inside of PageManager does not appear to get the appropriate context values from the route's parameters. This causes all contextual blocks using those contexts to fail. This is a release blocker and needs immediate solving.

CommentFileSizeAuthor
#9 panels_context_problem.png99.82 KBsamuel.mortenson

Comments

EclipseGc created an issue. See original summary.

japerry’s picture

samuel.mortenson’s picture

I wonder if this is due to the gathered contexts logic in PanelsBlockConfigureFormBase::buildForm() that does not appear in PanelsIPEBlockPluginForm:

    $contexts = $this->variantPlugin->getPattern()->getDefaultContexts($this->tempstore, $this->getTempstoreId(), $machine_name);
    $this->variantPlugin->setContexts($contexts);
    $form_state->setTemporaryValue('gathered_contexts', $contexts);

Do you have an example of a Block Plugin in Panels IPE that is throwing an error or losing Context?

Obviously the preferred solution here is to consolidate our form logic so that PanelsIPEBlockPluginForm extends PanelsBlockConfigureFormBase, but I'm not sure if a change that big can get in before the beta5 release. If I can quickly fix this before then, I'd like to!

samuel.mortenson’s picture

japerry’s picture

eclipsegc’s picture

So, I tried to fix this. This proved to be REALLY hard because we have NO clue what the context is. I think we are at a "punt" point where we need to discuss rebuilding IPE to take this sort of stuff into account.

Eclipse

samuel.mortenson’s picture

@EclipseGc I think a good first step would be to refactor all IPE forms to extend the forms written for the backend editor. Do you think that would help to resolve this issue?

If so - I can review some code next week and open a new issue for this.

samuel.mortenson’s picture

Easy replication steps (for my benefit):

  1. Install the standard profile
  2. Panelize the "Basic Page" Content Type
  3. Use IPE on a Basic Page, open the "Content" category
  4. See the "Image" entity_field block, even though there is no image field for Basic Pages.
samuel.mortenson’s picture

StatusFileSize
new99.82 KB

Following the same replication steps as #8, but using the default editor introduced by #2664682: Implement admin UI for editing Panelizer defaults, I see the same issue. I've attached a screenshot of the wizard editor for the "Basic Page" type, which also lists all entity_field blocks regardless of the Content Type.

I'd need to see a working example of what IPE is supposed to do before digging deeper.

damienmckenna’s picture

damienmckenna’s picture

damienmckenna’s picture

Version: 8.x-3.x-dev » 8.x-4.x-dev

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.