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

Relative Asset Paths #480

Open
jackd248 opened this issue Feb 9, 2024 · 1 comment
Open

Relative Asset Paths #480

jackd248 opened this issue Feb 9, 2024 · 1 comment
Labels
bug Something isn't working unconfirmed

Comments

@jackd248
Copy link

jackd248 commented Feb 9, 2024

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.

@jackd248 jackd248 added bug Something isn't working unconfirmed labels Feb 9, 2024
@Hanmac
Copy link
Contributor

Hanmac commented Apr 25, 2024

I got same problem:

It tries to access https://localhost.local/bundles/sonataform/379.js
but it should try to access https://localhost.local/<project>/public/bundles/sonataform/379.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unconfirmed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants