Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Media Root folder re-append public:// on form settings save.
- The reproduce the issue go to the Media browser plus settings page
- Populate the "Media Root folder" with some dir name (ex. media-root)
- click save
- when the page is loaded again you will see the "public://media-root " as a value of Media Root folder
- I change the public://media-root to public://media-root-1 and click save
- than the value is changed to public://public://media-root-1
Also I am not sure is needed at all to store the "public" part in the setting...May be is better just to store the directory name only?!
Comment | File | Size | Author |
---|---|---|---|
#2 | media-reappend-public-on-save-1959886-2.patch | 1.94 KB | ndobromirov |
#1 | media-root-folder-re-append-1959886-1.patch | 779 bytes | boyan.borisov |
Comments
Comment #1
boyan.borisov CreditAttribution: boyan.borisov commentedI prepared a patch that resolve the issue. It just removes the schema wrapper from the setting value and seems to work fine for me.
Comment #2
ndobromirov CreditAttribution: ndobromirov commentedThe patch above creates an issue with the subfolders moving funtionality, because the media_browser_plus_construct_dir_path method uses the variable media_root_folder's value internaly. Making the patch in comment 1 to copy files from destination to destination directory instead of source to destination directory by setting the variable's value in the beginning of media_browser_plus_move_root_folder method.
Sending a new patch.
Comment #3
shadysamir CreditAttribution: shadysamir commentedPatch from #2 gets rejected but applying it manually it solves the problem
Comment #4
ndobromirov CreditAttribution: ndobromirov commentedIt is probably patched against an older git revision.
Comment #5
das-peter CreditAttribution: das-peter commentedThank you very much for the patch.
May I ask you to you give MBP 3.0 beta1 a try?
The whole scheme stuff changed during the rewrite from 2.x to 3.x to properly support public and private files.
My goal is to discontinue the support for version 2.x as soon as possible.
Comment #6
N20 CreditAttribution: N20 commentedboth patches reject. how to remove the Media Root folder and its form element?
Comment #7
yannickooComment #8
kenorb CreditAttribution: kenorb commentedComment #9
salvis