form-extensions icon indicating copy to clipboard operation
form-extensions copied to clipboard

Relative Asset Paths

Open konradmichalik opened this issue 1 year ago • 3 comments

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.

konradmichalik avatar Feb 09 '24 11:02 konradmichalik

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

Hanmac avatar Apr 25 '24 15:04 Hanmac

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Oct 22 '24 16:10 github-actions[bot]

issue is still a problem, but can't really be fixed that way with how webpack is right now :(

Hanmac avatar Oct 23 '24 05:10 Hanmac

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Apr 21 '25 09:04 github-actions[bot]

the problem still exist

Hanmac avatar Apr 21 '25 15:04 Hanmac

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Oct 18 '25 16:10 github-actions[bot]

Still exists

Hanmac avatar Oct 18 '25 16:10 Hanmac

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

I have the same problem too !

athos99 avatar Oct 25 '25 17:10 athos99