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

On-demand revalidation should be usable regardless of Preview Mode configuration #496

Open
camilo-escobar opened this issue May 4, 2023 · 2 comments

Comments

@camilo-escobar
Copy link

Currently, the On-demand Revalidation cannot be used without enabling Preview Mode.
You need to choose a Preview Mode plugin (e.g., "Site Selector") and check one of your Next.js sites in the entity type configuration to get revalidate working. Without selecting a site, revalidate will not work. I think the site selection setting should not be tied to the "Preview Mode" option. One should be able to select a site and then specify whether to use the preview feature, revalidate, or both.

image

Even though you might not be interested in enabling the Preview Mode, you would also have to set a "Preview URL" in the Next.js site configuration, in order to prevent the original error reported in #451:
InvalidArgumentException: The URI '' is invalid. You must use a valid URI scheme. in Drupal\Core\Url::fromUri() (line 293 of /app/web/core/lib/Drupal/Core/Url.php).

image

Proposed solution: Detach the Site selection from the "Preview Mode" settings in the Entity Type config form. Allow the selection of a site and then permit the activation of "Preview Mode" and "On-demand Revalidation" independently.

@yannickoo
Copy link

FYI I figured out how to get rid of the Iframe preview, see the workaround here #521 (comment) 🎉

@blyme
Copy link
Contributor

blyme commented Jun 19, 2024

This also prevents editing existing menu entity-items, as the preview/draft iframe hijacks the menu edit-form. Screenshot is from /admin/structure/menu/item/{id}/edit Could be cool to get #660 merged

image

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

No branches or pull requests

4 participants