-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[4.0] Fix media path to banners folder #21189
Conversation
PR isn't shown at Issue Tracker, so no mark as successfully Test can be done. |
This PR is now shown in Issue Tracker, but as Issue, not as PR. |
@laoneo can you get Kasun to review this. Hardcoding the local adapter doesn't look very promising solution... |
@laoneo any update on this? |
Ups, that slipped through my inbox. With the new media storage API, we get now the question if hardcoded paths should still be supported. Because somebody can disable the local adapter and only work with media data from a cloud provider, this will likely crash again. I'm in favor to not support predefined paths as we store now the last opened folder in the local storage of the user anyway. Opinions? |
Allon is correct in here, btw as we resolves the URL without adapter prefix even disabling an adapter wont affect articles we use. About this one need to check whats the url being used to serve the banner, will take a look on pr |
Ok Provided solution is not acceptable for me, it uses a hardcoded adapter, even though we provide a method to fetch absolute url to a file, we can get the real url without the adapter prefix. It need to be done with js like @dgramatikko did with articles |
As long as it is not an absolute URL ;) |
@kasvith Thanks for your review :) |
FWIW I didn't do any magic tricks on the other fields, the reality is that the other fields don't use the folder option in the XML. Quite honestly I don't see how some client-side code can help up pick the right adapter. I think there must be a trait with some logic that handles that (some basic checks I guess), or just add one more option to the XML: adapter... |
@Anu1601CS Is this ready to be tested? |
This is not perfect fix for this. But, it works for now. We can open a new issue regarding not to hard code local adapter. |
@wilsonge Are you OK with fixing the hard coded local adapter in a separate PR or should it be done in this PR? |
I have tested this item ✅ successfully on 571a2e0 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21189. |
I have tested this item ✅ successfully on 571a2e0 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21189. |
Status "Ready To Commit". |
@roland-d i'd rather fix it if it's not some insane amount of work |
@Anu1601CS Can you please fix the issue in this PR? |
Ok i will try. |
I have tested this item ✅ successfully on 571a2e0 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21189. |
I have tested this item ✅ successfully on 571a2e0 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21189. |
Thanks! |
Captured doing a proper fix for the issue #26750 which doesn't block any potential cloud providers here |
Issue
Try to create a new banner. And select image.
Error. Server internal error.
Summary of Changes
Fix path in URL.
Testing Instructions
Try to create a new banner. And select image.
Expected result
Actual result
Error
Documentation Changes Required
NO