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

Manually update Metatag module

Hi,

Since I'm not using Composer and don't plan and want to, I have to manually update modules, since (PITA) that option has been removed from latest versions of Drupal (using latest Drupal 11). Mostly there's a version I can download, unpack and then upload over the existing module. With Metatag that seems to be impossible or unadvised, reading this:

Argument #6 ($time) must be of type Drupal\Core\Datetime\TimeInterface, Drupal\Component\Datetime\Time given

Good morning,

Drupal: 10.5.2
PHP: 8.2

I'm getting in my helper with dependency injection:
__construct(): Argument #6 ($time) must be of type Drupal\Core\Datetime\TimeInterface, Drupal\Component\Datetime\Time given, called in /var/www/core/lib/Drupal/Component/DependencyInjection/Container.php on line 261

I'm registering the services.yml in correct order:

checkbox widget conflicting label with form widget

I have a content type with checkbox widget. I defined the wedget definition through module.

$form['field_example_123']['widget']['value']['#title'] = t('some text <a href="@url" target="_blank">link text</a>.', ['@url' => '/test']);

The html is rendered as:

Mysterious missing settings in Javascript when logged out

I'm trying to develop a module to attach react to various sections of my page, and I've just come across an issue that is baffling me. (a cache issue perhaps? I'm not even sure!)

I build my react app into a file called app.bundle.js, and attach it with a library to a block or paragraph. There's a lot more to it, a couple nuances no doubt, but ultimately it works and is really cool.

This is for a side project and I proceeded with several days of happy developing. I foolishly never tested while logged out. No surprise, everything's broken when logged out (of course). 

Custom blocks - Missing icons in LayoutBuilder

I have created few custom blocks in Drupal 11.2, and could successfully insert them via Layout Builder. But when I want to edit them later on, I don't see the 3 icons to manage the content (move/edit /delete). What could be the causes or is there some change I need to make into the src/Plugin/Block code?

Reset form on page reload so previous state and errors are cleared

I have a content form that is used to submit data. If an error occurs on submit, the error is displayed on the top of the form. But, even if the user refreshes the page, the error is still there and the field state is also not cleared. I want the form to be cleared and reset to initial state on page reload. It shouldn't retain data.

Pages

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