Skip to content

Relative Asset Paths #480

@jackd248

Description

@jackd248

Environment

Sonata packages

show

$ composer show --latest 'sonata-project/*'
Direct dependencies required in composer.json:
sonata-project/admin-bundle              4.29.3                  4.29.3                  The missing Symfony Admin Generator
sonata-project/classification-bundle     4.8.0                   4.8.0                   Symfony SonataClassificationBundle
sonata-project/doctrine-extensions       2.3.0                   2.3.0                   Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 4.15.0                  4.15.0                  Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/exporter                  3.3.0                   3.3.0                   Lightweight Exporter library
sonata-project/intl-bundle               3.2.0                   3.2.0                   Symfony SonataIntlBundle
sonata-project/media-bundle              4.11.0                  4.11.0                  Symfony SonataMediaBundle
sonata-project/translation-bundle        dev-3.x-dev-kit e6ea40d dev-3.x-dev-kit e6ea40d SonataTranslationBundle

Transitive dependencies not required in composer.json:
sonata-project/block-bundle              5.1.0                   5.1.0                   Symfony SonataBlockBundle
sonata-project/form-extensions           2.3.0                   2.3.0                   Symfony form extensions
sonata-project/twig-extensions           2.4.0                   2.4.0                   Sonata twig extensions

Subject

We're using symfony instances on our staging system in subdirectories. Unfortunately we ran into the problem, that the public assets of the sonataform bundle points to absolute paths.

I think the paths need an relative "./" to be more flexible. See entrypoints.json and manifest.json.

I'm not so familiar with the webpack config, but I think changing the public path may deals with this fact, see webpack.config.js.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions