Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Panels pages #476

Open
Tracked by #480 ...
emdahlstrom opened this issue Mar 9, 2022 · 3 comments
Open
Tracked by #480 ...

Add support for Panels pages #476

emdahlstrom opened this issue Mar 9, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@emdahlstrom
Copy link

Describe the bug
Some routes produce this error message:

Cannot read properties of undefined (reading 'status')

At the same time the following cors-errors are reported:

Access to XMLHttpRequest at 'https://www.djurensratt.se/router/translate-path?path=/engagera-dig/stod-oss' from origin 'https://druxt-prototype.netlify.app' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

www.djurensratt.se/router/translate-path?path=/engagera-dig/stod-oss:1 Failed to load resource: net::ERR_FAILED

Other routes on the site work fine.

However this is a panel page with a bunch of views so there might be a problem with the panel or views system.

Other panel pages give the same result: /engagera-dig, /engagera-dig/bli-aktiv

To Reproduce
Steps to reproduce the behavior:
Go to this url: https://druxt-prototype.netlify.app/engagera-dig/stod-oss

Or grab our druxt experiment repo, run it and go to the route /engagera-dig/stod-oss

Expected behavior
I would expect the route to load but probably with messages from druxt debug about things missing or not being set up right.

Your Environment (please complete the following information):

  • Device: desktop
  • OS: fresh ubuntu install
  • Browser chrome
  • Version: the latest

Additional context
The same thing happens in local dev and on netlify static hosting

@emdahlstrom
Copy link
Author

emdahlstrom commented Mar 9, 2022

I created a panel page containing only a simple text block which gets the same error so it's likely panel pages, not views, that are at fault.

Example url: https://druxt-prototype.netlify.app/demo-simple-panel-page

@Decipher
Copy link
Member

Hi @emdahlstrom,

The issue with https://www.djurensratt.se/router/translate-path?path=/engagera-dig/stod-oss is that there's no direct support for Panels pages in the Decoupled Router module (https://www.drupal.org/project/decoupled_router)

I have previously opened an issue with the intent of making the Decoupled Router module more extensible, allow it to better support third party router providers, such as Panels, but I haven't had the time to prioritise the issue yet: https://www.drupal.org/project/decoupled_router/issues/3146024

The issue does have an example of how you can currently extend the routes support, based on the Druxt Drupal module which provides support for Views.

The CORS issue will likely just be a symptom of the unsupported decoupled route.

@Decipher Decipher added the enhancement New feature or request label Mar 10, 2022
@Decipher Decipher changed the title Error: Cannot read properties of undefined (reading 'status') on panel pages with views blocks Add support for Panels pages Mar 10, 2022
@emdahlstrom
Copy link
Author

@Decipher Excellent, thanks for the clarification!

We're planning to move from Panel Pages to Layout Paragraphs in our project so I'll focus on figuring that out.

I'm not clear on the status of panel pages in the ecosystem these days. I'd guess that Layout Builder will be more popular for site building and Layout Paragraphs for editorial content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants