WidgetBase breaks on $array['add_more'], radios

I'm using HOOK_form_alter to store a string for a taxonomy entity. Because I want to be graphical, I'm using the Form API radios type combined with special CSS for my customers to choose which color they want.

Relevant portion of mymodule.module

entity error

Dear all,

My website (http://www.evlbi.org) is showing an error (see below). I'm quite new at Drupal and am trying to understand what the problem is. I think it has something to do with the Backup & Migrate Module which is not installed. When I click on Extend to install the module I get the error.

Does anyone have any tricks on how to fix this?

Thanks!

Strange Url behaviour drupal 8.9.2

Strange URL behaviour drupal 8.9
Next problem I have on a drupal 8.9.5 dev site.
I have a entity with teams and this entity has a text field with the url of the team page (relative link)
On a view of the block type I rewrite the result with this rule:
<a href="{{field_team_link}}">
{field_team_icon_url}}
{{field_team_name}}
</a>

And the link field in the team entity is something like /teampagina/HA1 Where HA1 is the teamcode and this lead to a page with the contextual filter = team_code

How to create a custom module to automatically flag new entities ?

I created a small custom module to automatically flag new or updated entities.

My code doesn't work, there must be some errors. Can you help me ? Thank you

https://git.drupalcode.org/sandbox/zenimagine-3170711

What to use to include content in GIT versioning?

I have read through the following options I found. I am not sure which one to choose, when it comes to suitability for initial import, update convenience, future module support etc. Can you please share your experience to help me make my choice:

What to use instead of a global const in procedural code?

I have something like the following in mymodule.module:

const MYMODULE_CONST = 42;

/**
 * Implements hook_myhook().
 */
function mymodule_myhook($route_name, RouteMatchInterface $route_match) {
  return(t('The answer is @const', ['@const' => MYMODULE_CONST]));
}

This is the only place I use this constant. The reason for using a PHP global const for this is to have it defined near the top of the file for easy spotting and replacement. So having it as a value inside the function is not an option.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x