- Issue created by @project update bot
- Status changed to Needs review
9 months ago 2:54pm 30 May 2024 This is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request (MR) is also openend and updated.
It is important that any automated tests available are run and that you manually test the changes.
Drupal 11 Compatibility
According to the Upgrade Status module β these changes make this module compatible with Drupal 11! π
Therefore these changes update theinfo.yml
file for Drupal 11 compatibility.Leaving this issue open, even after committing the current patch or merging the MR, will allow the Project Update Bot β to post additional Drupal 11 compatibility fixes as they become available in Drupal Rector.
Debug information
Bot run #11-185727These packages were used to generate the fixes:
- drupal/upgrade_status: 4.3.1
- mglaman/phpstan-drupal: 1.2.11
- palantirnet/drupal-rector: 0.20.1
This is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request (MR) is also openend and updated.
It is important that any automated tests available are run and that you manually test the changes.
Drupal 11 Compatibility
According to the Upgrade Status module β these changes make this module compatible with Drupal 11! π
Therefore these changes update theinfo.yml
file for Drupal 11 compatibility.Leaving this issue open, even after committing the current patch or merging the MR, will allow the Project Update Bot β to post additional Drupal 11 compatibility fixes as they become available in Drupal Rector.
Debug information
Bot run #11-188138These packages were used to generate the fixes:
- drupal/upgrade_status: 4.3.2
- mglaman/phpstan-drupal: 1.2.11
- palantirnet/drupal-rector: 0.20.2
- First commit to issue fork.
- First commit to issue fork.
- heddn Nicaragua
Needs work because tests are failing. This depends upon π Automated Drupal 11 compatibility fixes for embed Needs review & π Automated Drupal 11 compatibility fixes for entity_embed Needs review landing first.
- Status changed to Needs work
29 days ago 12:00pm 5 February 2025 - π¬π§United Kingdom darren.fisher
I've managed to resolve most of the tests failing but I cannot resolve this one:
https://git.drupalcode.org/issue/file_browser-3451080/-/jobs/42551461) Drupal\Tests\file_browser\FunctionalJavascript\FileBrowserTest::testFileBrowserView ReferenceError: Dropzone is not defined at Object.attach (http://localhost/web/modules/contrib/dropzonejs/js/dropzone.integration.js?v=11.1.1:16:7) at http://localhost/web/core/misc/drupal.js?v=11.1.1:166:24 at Array.forEach (<anonymous>) at Drupal.attachBehaviors (http://localhost/web/core/misc/drupal.js?v=11.1.1:162:34) at http://localhost/web/core/misc/drupal.init.js?v=11.1.1:32:12 at HTMLDocument.listener (http://localhost/web/core/misc/drupal.init.js?v=11.1.1:20:7) TypeError: Cannot read properties of undefined (reading 'element') at http://localhost/web/modules/contrib/dropzonejs/modules/eb_widget/js/dropzonejs_eb_widget.common.js?v=11.1.1:15:39 at Array.forEach (<anonymous>) at Object.attach (http://localhost/web/modules/contrib/dropzonejs/modules/eb_widget/js/dropzonejs_eb_widget.common.js?v=11.1.1:14:60) at http://localhost/web/core/misc/drupal.js?v=11.1.1:166:24 at Array.forEach (<anonymous>) at Drupal.attachBehaviors (http://localhost/web/core/misc/drupal.js?v=11.1.1:162:34) at http://localhost/web/core/misc/drupal.init.js?v=11.1.1:32:12 at HTMLDocument.listener (http://localhost/web/core/misc/drupal.init.js?v=11.1.1:20:7) TypeError: $view.imagesLoaded is not a function at Object.attach (http://localhost/web/modules/custom/file_browser-3451080/js/file_browser.view.js?v=11.1.1:58:15) at http://localhost/web/core/misc/drupal.js?v=11.1.1:166:24 at Array.forEach (<anonymous>) at Drupal.attachBehaviors (http://localhost/web/core/misc/drupal.js?v=11.1.1:162:34) at http://localhost/web/core/misc/drupal.init.js?v=11.1.1:32:12 at HTMLDocument.listener (http://localhost/web/core/misc/drupal.init.js?v=11.1.1:20:7) /builds/issue/file_browser-3451080/web/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php:140
Not sure how the Dropzone or imagesLoaded javascript gets loaded within the runner? Bit beyond me but if anyone else with better knowledge of it can crack that one this should be good for testing again?
- heddn Nicaragua
Dropzone has a js library that doesn't natively get pulled in. My guess we have to add a before_script section to gitlab-ci to trigger download of the js library into the correct location.
- π¬π§United Kingdom darren.fisher
Does it count if the pipeline freezes and doesn't pass or fail? Jk. Not sure if I've done this right or not:
https://git.drupalcode.org/issue/file_browser-3451080/-/pipelines/415998 - heddn Nicaragua
From https://git.drupalcode.org/issue/file_browser-3451080/-/jobs/4258213, we should address the undefined calls to
libraries_get_path
And that might be why tests are failing in https://git.drupalcode.org/issue/file_browser-3451080/-/jobs/4258217. Maybe.
- π¬π§United Kingdom darren.fisher
Fixed those but still failing. It's not happy about this Dropzone library. Does dropzonejs need to be added as a library maybe in file_browser.libraries.yml? There's a dropzone css library entry but nothing for the js?
- heddn Nicaragua
I think we are now at valid test failures. The library got downloaded fine at this point. I ended up copying from gitlab-ci on dropzone.
- π¬π§United Kingdom darren.fisher
So is the issue now that we need to do the same for imagesLoaded?
- π¬π§United Kingdom darren.fisher
Ok progressed this further but hit a wall again. Masonry is not a function. I've tried pulling in masonry from two different sources in the gitlab-ci but it's still failing.
- π¬π§United Kingdom darren.fisher
I can't get through this failure:
There was 1 failure: 1) Drupal\Tests\file_browser\FunctionalJavascript\FileBrowserTest::testFileBrowserView Behat\Mink\Exception\ElementNotFoundException: Button with id|name|title|alt|value "Use selected" not found.
Does anyone with better knowledge of these tests know why it wouldn't be able to find the Use selected submit input? I've manually tested the steps in the test and everything looks correct to me. I'm a bit lost now. I've managed to resolve all of the JS library loading failures but this one is beyond me!
- π¬π§United Kingdom darren.fisher
These tests are failing due to Button with id|name|title|alt|value "Use selected" not found. I have tried various attempts to resolve this and am at my wits end with it. I suspect it may be to do with the use of the iframe or something which has changed in entity_browser itself. Feel free to take a look.
- π¬π§United Kingdom daniel.j
daniel.j β made their first commit to this issueβs fork.
- π¬π§United Kingdom daniel.j
I've made some changes and tests are now passing.
For the phpunit functional JS tests, in some places moving away from jQuery to native JS has allowed the tests to pass. Additionally, I've added a `composer.libaraies.json` file in order to add clarity to the library versions that are being used.
Please review, thanks.
- π¬π§United Kingdom darren.fisher
This is looking good now. Can people please test so we can get this module a stable Drupal 11 release?
- π¬π§United Kingdom daniel.j
daniel.j β changed the visibility of the branch 3451080-d11_ready to hidden.
- π¬π§United Kingdom darren.fisher
Any news? Desperate for a D11 release!!!