Skip to content

Admin Panel Sync/Flash Buttons not respecting CRAFT_BASE_CP_URL - using frontend SITE_URL instead #68

@vardumper

Description

@vardumper

We saw this strange behavior:
After having changed the DDEV domain for the craft admin panel from project.ddev.site to cms.project.ddev.site the Sync/Flush buttons stopped working. (loading gif starts, and never stops)

At the same time the CLI commands worked perfectly fine. Stuff was added to the queue and getting processed.

As it turned out the baseUrl that's written in the twig file, uses the PRIMARY_SITE_URL which then had the button action point to project.ddev.site (basically giving a CORS error, nonetheless thats where our headless frontend is located).

Find a patch attached which basically adds support for Crafts' CRAFT_BASE_CP_URL env variable.
craftpulse-typesense-fix-baseurl.patch

Version Details:
craftcms/cms: 4.16.16
craftpulse/craft-typesense: 5.4.3

Kind regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions