- Merge request !34Issue #3305966: Media block is allowed even if not indicated as allowed β (Merged) created by eiriksm
- πΊπΈUnited States loze Los Angeles
Actually I was mistaken. This does not do what i expected. With this patch all blocks are available, regardless of the setting on the node type page.
- last update
about 1 year ago 2 pass, 1 fail - π³π΄Norway eiriksm Norway
That's correct. The MR currently only contains a failing test
- last update
about 1 year ago 2 pass, 1 fail - last update
about 1 year ago 2 pass, 1 fail - Status changed to Needs work
about 1 year ago 7:24pm 16 November 2023 - π³π΄Norway eiriksm Norway
Setting to needs work since it only contains the test for now
- last update
about 1 year ago Composer require-dev failure - last update
about 1 year ago Composer require-dev failure - last update
about 1 year ago Composer require-dev failure - last update
about 1 year ago Composer require-dev failure - last update
about 1 year ago Composer require-dev failure - last update
about 1 year ago Composer require-dev failure - last update
about 1 year ago 2 pass, 2 fail - last update
about 1 year ago Composer require-dev failure - last update
about 1 year ago 2 pass, 2 fail - last update
about 1 year ago Composer require-dev failure - last update
about 1 year ago Composer require-dev failure - last update
about 1 year ago Composer require-dev failure - last update
about 1 year ago Composer require-dev failure - last update
about 1 year ago Composer require-dev failure - last update
about 1 year ago Composer require-dev failure - last update
about 1 year ago Composer require-dev failure - last update
about 1 year ago Composer require-dev failure - last update
about 1 year ago Composer require-dev failure - last update
about 1 year ago Composer require-dev failure - last update
about 1 year ago Composer require-dev failure - last update
about 1 year ago Composer require-dev failure - Status changed to Needs review
about 1 year ago 9:06pm 21 November 2023 - π³π΄Norway eiriksm Norway
Whew, what a ride. I see I opened this a year ago. Time to close this, and to increase the test coverage on the project in the process I think.
So, there's a couple more things happening in this MR:
I wanted to add a couple FunctionalJavascript tests for this, but it seemed those were not running so well in gitlab CI because of #[3403222]. So this MR also includes a workaround for that, so we can add JS enabled tests to this project.
Then to what is actually happening here:
- First, we add a test to check if the Media block is showing, even if we never actually allowed that (we only allowed the paragraph block).
- Then there is a test to check if we can enable it and it will show. Well that's certainly not possible, there is no such option. So the test is failing because of this missing option.
- Then, since it's not possible to actually allow the media block (there is no option for this) we now add this option to the form
- Then added to the media JS file, to only register the media block if this block is allowed.
- Both the tests are now passing. We can enable and disable the media block at willHowever, this leaves an important change. Since it was never possible to disable the block, that means this block has been enabled on all sites that has the media module enabled (whether they want to or not). And chances are that many people actually want this. So it would be rude to now require them to go in and change things around and allow that specific block to be able to continue using their site exactly as it was before they updated. So the MR also includes an update hook to enable the block on all gutenberg enabled content types. And a test that ensures that this is in fact working.
There were much back and forth to get this finally working, but I am happy to try to get some test-only patches up here (or just link to the pipelines that are relevant)
@loze: Please give this a test and see if it helps you!
- last update
about 1 year ago 5 pass - Status changed to Fixed
about 1 year ago 10:32am 22 November 2023 -
eiriksm β
committed dd704217 on 8.x-2.x
Issue #3305966 by eiriksm: Media block is allowed even if not indicated...
-
eiriksm β
committed dd704217 on 8.x-2.x
Automatically closed - issue fixed for 2 weeks with no activity.