Skip to content

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

Open
@camilo-escobar

Description

@camilo-escobar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions