Problem/Motivation
Currently, there is no way to use this module as a dependency in a profile. Working with OpenY we faced to a problem that when libraries folder is locating in a profile this module does not work, because of the path to the library is using only libraries folder in the root directory and module does not expect that libraries could be located in other places.
Proposed resolution
Add supporting module libraries in a case when this module installed, to be sure module will find needed library even if it is locating in a profile.
Remaining tasks
Review patch.
User interface changes
None.
API changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | panelbutton-module_can_t_find-2881820-11.patch | 581 bytes | sylvainm |
| #8 | module_can_t_find-2881820-8.patch | 595 bytes | finne |
| #4 | panelbutton-libraries-2881820-4.patch | 614 bytes | ddrozdik |
Comments
Comment #2
ddrozdik commentedHere is a patch.
Comment #3
hamrant commentedLooks good
Comment #4
ddrozdik commentedI found an issue with the latest patсh. Here is update version.
Comment #6
ddrozdik commentedComment #7
finneThis fix breaks the loading of the js file when you deploy to a subdir of the server document root (when the base path is not just "/"). It hard-codes the base path as "/".
Comment #8
finneAdded fixed patch that uses base_path() instead of "/".
Comment #9
finneComment #10
sylvainm commentedCKEditorPluginInterface::getFile() doc says: "Returns the Drupal root-relative file path to the plugin JavaScript file."
So, when adding base_path() or "/", it becomes an absolute, and wrong, path: "/libraries/panelbutton"
I think it should be "libraries/panelbutton".
README says: "Place the plugin in the root libraries folder (/libraries).", so you can't place the library elsewhere.
attached patch
Comment #11
sylvainm commentedSorry, wrong patch…
Comment #12
ckaotikThis is actually a regression from #2756597: Plugin path should not provide leading slash which contains quite a bit of discussion and originally fixed the problem. I've also marked #2907730: Module can't find library is a duplicate of this issue (because this one is much older).
Also, credit should be added for people that contributed to those issues as well, since even the patch files are identical.
All three issues have the same solution, and it's a shame that this has crept back in. We might want to consider adding a test for this?
Comment #13
lukasss commented#11 needs to be fixed
Comment #14
tstoecklerWorks for me, as well.
Comment #15
partdigital commentedConfirm, the patch in #11 works for me.
Comment #16
alex_optimI recreate patch, use the better way. This is the issue is similar to this https://www.drupal.org/project/ckeditor_font/issues/2900789
Comment #17
alex_optimComment #18
dakwamine#11 worked for me.
Unfortunately, #17 didn't work for me. The generated path was still starting with a / character.
Comment #19
miroslav-lee#11 worked for me too.
Comment #20
ddrozdik commentedI agree with @ckaotik in the #12 comment that it makes sense to add a test to cover this issue and make sure it will not happen again. I created a new issue for this #3031293: Create a test to check the library path is correct.
At this moment I will merge #11 to fix the issue until we get a better-worked solution. I like the idea proposed in comments #16 and #17, but it does not work for me as well.
Comment #22
ddrozdik commented