This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Need help with phpcs error

I have the following construct in one of my projects:

  $message['body'][] = Markup::create('<br />&nbsp;<br />' . t('This is an automatic e-mail from @sitename. To stop receiving these emails, change your notification preferences at @host/user/@useruid/notify.' . '</p>',
     ['@sitename' => $sitename, '@host' => $host, '@useruid' => $useruid], ['langcode' => $upl]));

GitLab CI testing is not happy, and tells me:

Disable elements caching in a field formatter

I have built a field formatter this way:

Configuration Synchronization Error

I am trying to import views from one of my Drupal 9 sites, we will call it Drupal A to another Drupal 9 site, we will call it Drupal B. 

I keep getting this error: 

"Error message

The configuration cannot be imported because it failed validation for the following reasons:

Drupal 10.1.3 - custom rest resource will not recognize post

I followed the  REST tutorial and then the instructions on how to make POST available ("create" option) but it does not work. The POST route is not recognized.

Version: 10.1.3

REST-UI: 1.21

Folder structure:

Unknown PHPUnit test error: AssertionError: assert(!str_starts_with($data_type, 'entity:')

When creating a PHPUnit functional test on this route `/support_ticket/add/ticket` the "AssertionError: assert(!str_starts_with($data_type, 'entity:')" error occurs. I can't seem to find any information about what it means. When testing the same route in a browser a http 200 response is returned and the page renders correctly.

The questions I am searching information for are mentioned below. Any direction would be gratefully received.

PHPUnit test passes locally, but fails when posted to Drupal project page

I'm maintaining a new contributed module, Bootstrap Theme Toggler, and am having a problem with it failing a PHPUnit functional test that I've defined and included in the project.

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions