Thanks for the nice evening! (Ingo)
Thank you for the commit @kazajhodo! Fixes the problem for us.
Also added the patch we used to temporarily fix the problem on our sites before 1.1.12 was released.
Updated info about checking for security related updates. Use composer instead of drush.
Thank you for the interesting talk and the delightful evening! It was a pleasure meeting everyone.
The solution in #20 is working well for me on Drupal 9.5.11 when performing the following steps:
Uncheck all options from Menu Token config at /admin/config/menu_token
Disable the module:
drush -y pmu menu_token
Remove the dead route:
drush sql:query "DELETE from menu_tree WHERE route_name = 'menu_token.available_entities_configuration_form'"
Rebuild cache:
drush cr
Patch from #12 resolves the issue for us on Drupal 10.2.2
I am having the same problem with 1.1.x version.
Added info about creating constraint boilerplate code using Drush. Explained how to use setConstraints() to add multiple constraints to a field at once.
Changed the random ID "WetPersonallistenEndTimeConstraint" to "MyModuleStartEndTimeConstraint" and added explaination of the ID annotation.
Changed field names to english language.
Thank you @shivam_tiwari. Did not run a test but code looks good to me now.
@podarok, could you please merge and run a test?
setUp()
must be defined as protected function setUp(): void {
I also see some other errors when I open ContentModerationTranslationTest.php
in Vscode:
Undefined method 'drupalPostAjaxForm'
Undefined method 'drupalPostAjaxForm'
Undefined method 'assertTrue'
The test in ContentModerationTranslationTest.php
and InlineEntityFormTestBase
require some refactoring, as InlineEntityFormTestBase
extends WebDriverTestBase
.
ContentModerationTranslationTest.php
requires a use Drupal\Tests\inline_entity_form\FunctionalJavascript\InlineEntityFormTestBase;
and the deprecated calls to drupalPostAjaxForm(..)
need to replaced with drupalPostForm
.
See https://www.drupal.org/docs/automated-testing/converting-simpletests-to-... → .
The patch #8 creates /src/Tests/ContentModerationTranslationTest.php
. ContentModerationTranslationTest
extends InlineEntityFormTestBase
which is not defined in this namespace.
This breaks automatic tests on the 2.0.x branch:
PHP Fatal error: Uncaught Error: Class "Drupal\inline_entity_form\Tests\InlineEntityFormTestBase" not found in /var/www/html/modules/contrib/inline_entity_form/src/Tests/ContentModerationTranslationTest.php:12
See this result for example: https://www.drupal.org/pift-ci-job/2666453 →
Patch applies successfully to 2.0.x-dev
and 2.0@beta
.
Automated tests for patch #15 fail with PHP 8.1 & MySQL 8, D9.5 run-tests.sh fatal error
due to an unrelated error:
PHP Fatal error: Uncaught Error: Class "Drupal\inline_entity_form\Tests\InlineEntityFormTestBase" not found in /var/www/html/modules/contrib/inline_entity_form/src/Tests/ContentModerationTranslationTest.php:12
Rerolled patch #5 for 2.0.x-dev branch and fixed some coding standard issues.
Thanks for your hint @ ghalusa → . I fixed the first code block, updated description and reverted the page status.
Added example for a complex custom constraint validator and some additional notes.
Ran into the same problem with Tome 8.x-1.10 and Drupal 9.5.4 on a site still running on PHP7.4 (fpm and cli). I am not sure, if the same problem exists with PHP8.x.
I'm working on a host with multiple PHP versions, so I'm calling Tome static export via CLI from project root directory with the following command:
php7.4 vendor/bin/drush --root=/var/www/sites/mysite tome:static --uri=https://www.example.com
Reverting back to Tome 8.x-1.8 fixes the problem.