- Issue created by @interlated
- last update
about 1 year ago Build Successful - ๐ฌ๐ทGreece walkero
I have the specific issue on my site, running on PHP 8.1
- Status changed to RTBC
12 months ago 4:40am 10 January 2024 - last update
12 months ago Build Successful - ๐ฏ๐ตJapan tyler36 Osaka
patch #4 worked for me.
Marking as RTBC
Bumping priority to "major" because it breaks site functionality (prevents access to content formats)## TEST
1. Install and enable Markdown addon
composer require 'drupal/markdown:^3.0' drush en markdown
2. Visit "/admin/config/content/formats/manage/basic_html"
- Error displays "Class Drupal\markdown\BcSupport\SubformState contains 2..."
3. Apply #4
4. Page displays correctlyDrupal-core: 10.2
Markdown: 3.0.1 - ๐ฏ๐ตJapan tyler36 Osaka
Came across https://www.drupal.org/project/markdown/issues/3409277 ๐ Subformstate incorrect interface error Active which attempts to patch issue, but thedoesn't work.
Not sure if maintainer want to give credit for any work there.I'm going to close 3409277 in favor of this because it's working.
- Status changed to Needs work
12 months ago 6:29am 10 January 2024 - ๐ฏ๐ตJapan tyler36 Osaka
Back to NW, noticed the following error appearing under the filter settings:
Drupal\markdown\Form\ParserConfigurationForm::buildParser(): Argument #2 ($form_state) must be of type Drupal\markdown\Form\SubformStateInterface, Drupal\Core\Form\SubformState given, called in /var/www/html/web/modules/contrib/markdown/src/Form/ParserConfigurationForm.php on line 239
- ๐จ๐ฆCanada ambient.impact Toronto
Ambient.Impact โ made their first commit to this issueโs fork.
- last update
12 months ago Build Successful - Status changed to Needs review
12 months ago 12:00am 19 January 2024 - ๐จ๐ฆCanada ambient.impact Toronto
This seems to be partly caused by the deprecated backwards compat
\Drupal\markdown\BcSupport\SubformState
and its interface, both of which seem to have been intended to be removed in 3.0.0 but probably got overlooked. Anywho, I think I fixed the remaining errors and I can access the filter form again. - ๐จ๐ฆCanada ambient.impact Toronto
Please use issue forks going forward. If you need a patch file, you can download those from GitLab.
- Status changed to Needs work
12 months ago 2:03am 19 January 2024 - ๐บ๐ธUnited States olarin
Tried both the merge request and the patch in #4 (not at the same time of course). In either case, while I could successfully edit the text format again, when looking at the Markdown filter settings in the text format, the following error was displayed:
Error message Drupal\markdown\Form\ParserConfigurationForm::buildParser(): Argument #2 ($form_state) must be of type Drupal\markdown\Form\SubformStateInterface, Drupal\Core\Form\SubformState given, called in /var/www/html/webroot/modules/markdown/src/Form/ParserConfigurationForm.php on line 239
Furthermore, if I save the text format (even without making changes), then it seems to break formatting entirely, i.e. a text field using Markdown is displayed without _any_ formatting, as in no HTML tags at all, not even line breaks or paragraphs. (Fortunately I tested this on a dev copy of a site and not a live site.) There are other filters at play on the site in question, but I tried turning all the rest of them off and confirmed that Markdown specifically is the one causing the formatting to be stripped (whereas if I turn Markdown off the text at least gets paragraphs and line breaks again, and the other filters can work as expected).
- last update
12 months ago Build Successful - Status changed to Needs review
12 months ago 11:40pm 19 January 2024 - ๐จ๐ฆCanada ambient.impact Toronto
@Olarin You're totally right. I caught that exact problem late last night but didn't get around to pushing my changes until now. It looks like it was caused by the original commit which replaced Markdown's
SubformState
with core's, but that didn't fix the root cause and conflicted with my commits. I reverted the original commit and it seems to have fixed it for me, so would like to know if it fixes it for you as well. You may have to import config in your dev environment again to fix it, because it's a nasty bug that would have nuked the active config or at least did for me. - ๐บ๐ธUnited States olarin
Yes, the latest version of the pull request seems to work properly for me, thanks.
Latest version of pull request I interpret as....
https://git.drupalcode.org/project/markdown/-/merge_requests/29.diff
I applied and it seems to work! :)
- Status changed to RTBC
12 months ago 8:18pm 25 January 2024 - ๐บ๐ธUnited States mayankguptadotcom Charlotte
Tested #14 on DDEV.
Works fine on Drupal 10.2.2
PHP 8.1.26 - ๐ฌ๐งUnited Kingdom Janner
I need to make some changes to a couple of filters and am reluctant to so because of some of the reports in this thread - in particular @Olarin's experience of the formatting being stripped after separately installing 2 of the patches posted above.
Accordingly, would someone please confirm that the patch in #14 resolves the underlying problem and enables the subsequent editing of filters with no issues.
This would be with version 3.0.1 of the module.
Thanks
- ๐บ๐ธUnited States Chris Burge
Moving to critical. Site builders cannot create or edit text formats. There is no workaround. MR 29 resolves the issue.
Without MR:
- Navigate to https://mysite.localhost/admin/config/content/formats
- Click on Add Text Format
- Observe fatal error
- Navigate to https://mysite.localhost/admin/config/content/formats
- Attempt to configure any text format
- Observe fatal error
With MR:
- Navigate to https://mysite.localhost/admin/config/content/formats
- Click on Add Text Format
- Observe page loads as expected
- Navigate to https://mysite.localhost/admin/config/content/formats
- Attempt to configure any text format
- Observe page loads as expected
- ๐บ๐ธUnited States jerrac
MR 29 worked for me today when I ran into this issue on a dev site.
- ๐ฎ๐ณIndia Tilottama11
After applying MR 29 , on page load I got another issue
Fatal error: Could not check compatibility between Drupal\markdown\Form\SubformState::createForSubform(array &$subform, array &$parent_form, Drupal\Core\Form\FormStateInterface $parent_form_state, ?Drupal\markdown\Form\FormInterface $subform_form_object = null) and Drupal\Core\Form\SubformState::createForSubform(array &$subform, array &$parent_form, Drupal\Core\Form\FormStateInterface $parent_form_state, ?Drupal\Core\Form\FormInterface $subform_form_object = null), because class Drupal\markdown\Form\FormInterface is not available in \web\modules\contrib\markdown\src\Form\SubformState.php on line 57 - ๐จ๐ฆCanada bisonbleu
This fix does not appear to be available in the latest Dev version?
I'm still getting the above reported error :/ Hi,
I've tried using this https://git.drupalcode.org/issue/markdown-3409277/-/tree/3409277-subform..., but I'm still encountering the same issue. I am using Drupal 10.3.0 and Markdown 3.0.1.
Has anyone found a fix for this?- ๐ฉ๐ฐDenmark lennart
Using Drupal 10.3.1 and Markdown 3.0.1
I am getting a 500 error / WSOD on adding a new or editing of any existing text input format.
I am also getting the 500 error / WSOD on /admin/config/content/markdown/commonmark - ๐ณ๐ฟNew Zealand jonathan_hunt
The patch in MR !29 works for me with Markdown 3.0.1. on Drupal 10.3.6. It would be great to get it merged, thanks.
- ๐ซ๐ทFrance pacproduct
Upgrading from Drupal 10.1 to Drupal 10.3.6 broke the markdown module as explained in this issue, and the patch in MR !29 works for me too and does solve the issue with Markdown 3.0.1. Thanks!