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
Fix on asset links for the symfony layout #34394
Conversation
M0rgan01
commented
Oct 26, 2023
•
edited
edited
Questions | Answers |
---|---|
Branch? | develop |
Description? | Fix on asset links for the symfony layout, see #34392 |
Type? | bug fix |
Category? | BO |
BC breaks? | no |
Deprecations? | no |
How to test? | CI and UI tests are green |
UI Tests | legacy: https://github.com/M0rgan01/ga.tests.ui.pr/actions/runs/6665432947 / symfony: https://github.com/M0rgan01/ga.tests.ui.pr/actions/runs/6665433853 |
Fixed issue or discussion? | Fixes ##34392 |
Related PRs | - |
Sponsor company | - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@M0rgan01 Something is still wrong my brother. It added query strings to the end of the assets, but the paths are still missing the folder prefix. 🤔 Could you check?
Update - it's because of the absolute path. Changing <script src="{{ asset('/js/admin.js') }}"></script>
to <script src="{{ asset('js/admin.js') }}"></script>
fixes the issue.
@Hlavtox Ok, you don't need an absolute path but rather a relative one. it should be better.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works fine ;-)
@M0rgan01 Do you think it would it be possible to improve the paths automatically? I think it's a bit confusing to omit the This solution requires to do some changes to template and won't solve module issues, because for example you would still get this in a module:
|
For modules, or any other folder, it is possible to add a package
It is also possible to navigate directly in the asset path. For the automatic aspect of improving the paths, it is possible to create our own extension, or dynamically calculate the URL to have a complete link. But that would require more time and maintenance. This is possible but do we want to invest time to improve paths or the impact is only visual for developers? |
QA ✅ |