I have just been (accidentally) able to reproduce this issue when updating a project with scheduler
and scheduler_content_moderation_integration
. I can confirm that the current state of the MR fixes the issue. Not the cleanest fix, but good enough for now I'd say, because I have no idea how else to fix this.
dieterholvoet → created an issue.
I updated the issue title and description to be more clear.
New Feature: The addition of alternative spellings or synonyms configuration for the Tagify widget. We can introduce a new configuration option in the widget that allows you to define alternative spellings or synonyms using tokens and specify the field that contains these variations.
No, this is not what I asked. The alternative spellings feature is something I have in my own site, something that's completely handled within a custom entity reference selection handler. The only problem is that Tagify doesn't display a suggestion that's returned by Drupal if the search term is not contained in the suggestion. You can see that in the example JSON I embedded in my previous comment.
I just had a look myself and found an easy fix to make sure no results returned by Drupal are ever excluded from the Tagify dropdown.
Never mind.
dieterholvoet → created an issue.
which I raised concerns about in #4
I see your concerns, but files can still be stored on the field, it's just optional now. So nothing really changes unless that option is explicitly changed, right? That does remind me that we would need to add a update hook to update keyvalue for existing imported PDFs, for existing sites updating the module.
That doesn't fix the problem in my use case. I should've been more clear, I'll explain. I have an Artist content type with an 'Alternative spellings' field. I wrote a custom entity reference selection handler that doesn't only search the title field, but also the alternative spellings field. So imagine there's a 'Foo' artist with 'Bar' in its alternative spellings. Now, when I search for 'Bar', the autocomplete endpoint returns the following data:
[
{
"entity_id": 15190,
"entity_title": "Foo",
"label": "Foo",
"info_label": "",
"editable": false
},
{
"entity_id": 9133,
"entity_title": "Barox",
"label": "Barox",
"info_label": "",
"editable": false
},
{
"entity_id": 5028,
"entity_title": "Barker",
"label": "Barker",
"info_label": "",
"editable": false
},
{
"entity_id": 7076,
"entity_title": "Baraka",
"label": "Baraka",
"info_label": "",
"editable": false
}
]
but the first result isn't shown in the widget. Isn't it possible to disable Tagify filtering the results? I don't see why that's necessary, since the backend does the filtering.
This seems to work very well! For a long time, the Tagify widget was a bit buggy. The changes here seemed to have fixed that. I'll let you know if I encounter anymore weirdness, but during my testing in the past days everything seemed okay.
@rajab natshah in
🐛
The content planner 8.x-1.2 not compatible with Scheduler 2.2.0
Active
you mentioned that this happens in a CI pipeline. Do you have a composer dump-autoload
somewhere in that pipeline and if so, what options are being passed? Or is this also happening in environments where you didn't explicitly dump the autoloader?
dieterholvoet → made their first commit to this issue’s fork.
If I understand it correctly:
- The
scheduler.module
file is not always loaded, e.g. before adrush updb
, so it's not enough to put the aliases there. - The
SchedulerEvent
andSchedulerEvents
aren't always autoloaded either. I have a suspicion that it has to do with the way the Composer autoloader is built. For example, as described here, when you dump the autoloader using--classmap-authoritative
files with only aclass_alias
statement are not autoloaded.
The best option might be to - as you said - add these class_alias statements to both places and prefix them with @ to suppress errors. A bit dirty, but I don't know if there's a better way.
#12 confirms that this is not an issue with content_planner. Let's investigate this further in 💬 Sheduler upgrade 2.2.0 and content planer 8.x-1.2 Active .
{
"type": "vcs",
"url": "https://git.drupalcode.org/issue/entity_bundle_scaffold-3367659.git"
}
Make sure to add it before the https://packages.drupal.org/8
repository. Afterwards, run composer require drupal/scheduler:"dev-3498553-autoload-file as 2.1.0"
.
Never mind, autoloading class_aliases.php
doesn't work either because when that file is autoloaded, the classes that are being aliased aren't autoloaded yet.
- With that patch we'll just be re-introducing the issue we fixed in 🐛 TypeError: Drupal\content_calendar\EventSubscriber\SchedulerPublishSubScriber::onNodePublish(): Argument #1 ($event) must be of type Drupal\scheduler\SchedulerEvent, Drupal\scheduler\Event\SchedulerEvent given in Drupal\content_calendar\EventSubscriber\Sc Active .
- I think 🐛 class_alias calls not available when rebuilding container in ModuleInstaller Active might be related to the issue we're having here.
- I still can't reproduce the issue, but I'll start a MR to do it the way core did in #3214234: Add core/class_aliases.php →
If you or your organisation really needs this feature: I'm also available for paid work. Feel free to contact me through the contact form on my profile → if you're interested in sponsoring my time to work on this.
If you or your organisation really needs this feature: I'm also available for paid work. Feel free to contact me through the contact form on my profile → if you're interested in sponsoring my time to work on this.
I added a 'Fail validation if the VIES database is unavailable' option that allows you to pass validation if the VIES database is unreachable. This option is enabled by default, so existing installations are not impacted.
dieterholvoet → created an issue.
I noticed that when you're typing fast in the autocomplete field, for every keystroke, a new request is sent to the server. Previous requests are aborted by the client on the next keystroke, but the request is still sent to the server, causing unnecessary load. Could you maybe implement some sort of debounce function to make sure that doesn't happen? Apart from that, everything seems to work alright. I'm updating the patches on a couple production projects I'm using regularly, so I'll report back if I encounter any strange behaviour in the next weeks.
Thanks!
dieterholvoet → made their first commit to this issue’s fork.
I actually tested the MR, and all seems to work as expected. Thanks for your contribution @chlandin!
@prem suthar interesting, you changed the completely wrong setting in issue_review-1.png
, but it still resulted in the correct confirmation message in issue_review-2.png
? That's some magic!
I should add that this also broke the required by role functionality as well. On the editpage of the node, fields that should not have been required for admin were showing as required.
Maybe that's caused by this problem, but I should note that fields that are conditionally being made (not) required now always show the red asterisk, even though no validation error is shown when submitting the form. This was a side effect of a big, necessary refactor of the module. I thought it was acceptable at the time, but if you don't like the way that works, feel free to open a separate issue and we can try to make that a configurable option. Shouldn't be too hard, it's only a visual thing after all. Let's wait until we figure out this issue first though.
That's not right, Drupal\Core\Field\FieldDefinitionInterface::isRequired()
is never supposed to return an array:
/**
* Returns whether the field can be empty.
*
* If a field is required, an entity needs to have at least a valid,
* non-empty item in that field's FieldItemList in order to pass validation.
*
* An item is considered empty if its isEmpty() method returns TRUE.
* Typically, that is if at least one of its required properties is empty.
*
* @return bool
* TRUE if the field is required.
*
* @see \Drupal\Core\TypedData\Plugin\DataType\ItemList::isEmpty()
* @see \Drupal\Core\Field\FieldItemInterface::isEmpty()
* @see \Drupal\Core\TypedData\DataDefinitionInterface:isRequired()
* @see \Drupal\Core\TypedData\TypedDataManager::getDefaultConstraints()
*/
public function isRequired();
Could you share the YAML content of the field config that's failing? Should be a field on the events
node type, one with an array instead of a boolean in its required
key.
I think the only way to detect what dimension transformations happen in a Bunny Optimizer image class is to talk to the API and figure out what the underlying operations are, but that sounds complex. We'll would also need to add a configuration option to the toolkit for the API key. If you're willing to implement this I'd be happy to review and merge it, but since I don't use the Responsive Image module myself I don't see myself implementing this anytime soon.
We could also change the namespaces to the new ones and bump the minimum required Scheduler version. But still, probably better to figure out what exactly is going wrong here.
I don't think adding the dependency to composer.json
is going to make a difference. The Drupal packager does that automatically:
If a module does not have any dependencies, or the dependencies are solely other Drupal modules, then a composer.json is not required. However, having a composer.json does not have a negative impact either.
Regardless of whether or not a developer has a composer.json file, their Drupal module dependencies must still be expressed in their .info.yml files so that Drupal can ensure that the correct modules are enabled.
Source: Add a composer.json file →
@rajab natshah what do you mean by 'on a new install'? Are you enabling both modules for the first time, or is one of them already enabled? And which exact versions are you installing?
Maybe name the new option 'Confirmation message' instead of 'Redirect response', because the latter is an existing technical term and might be confusing. You can see this in the controller, the line below your change contains RedirectResponse
:)
Apart from that, looks good! If you can just change that I'll test and merge.
@seanb could you create a new release after committing this one? It's quite blocking for D11 users.
dieterholvoet → created an issue.
The name of this module is 'Required by Content Moderation state', so changing editability seems out of scope here. I recommend starting a new, more abstract module that's able to control multiple things like requiredness/editability/visibility.
The name of this module is 'Required by Content Moderation state', so changing editability seems out of scope here. I recommend starting a new, more abstract module that's able to control multiple things like requiredness/editability/visibility.
@fishfree moving this to the issue queue of the parent module,
Required API →
. I understand your feature request, but I don't see myself implementing this anytime soon. I'm happy to review MR's though. In the meantime, I recommend implementing your own Required
plugin.
Seems like I don’t have permission to do that (source). You’ll have to open an issue on the Drupal.org project ownership queue → , or transfer and update this one.
I'll wait with working on issues or creating releases until this is cleared up.
dieterholvoet → created an issue.
I started a new implementation based on the latest approach in 🐛 Untranslated menu items are displayed in menus Needs work .
dieterholvoet → made their first commit to this issue’s fork.
The MR in 🐛 Untranslated menu items should be hidden Postponed doesn't seem up to date with the latest approach taken in 🐛 Untranslated menu items are displayed in menus Needs work . I'll move my MR to that issue.
I created a MR with a rebased version of 3347301.patch
.
dieterholvoet → made their first commit to this issue’s fork.
dieterholvoet → created an issue.
dieterholvoet → created an issue.
No, already working on it.
dieterholvoet → created an issue.
It would probably be a good idea to add a hook_requirements
implementation that checks if the extension exists using extension_loaded()
, just like system_requirements()
does.
This doesn't seem like a widely requested or useful feature to me, it should probably live in custom code or a separate module. If anyone else is still interested in this feature, feel free to re-open.
Feel free to reopen if someone else is interested in this feature.
Drupal 7 has been officially EOL since 5 January 2025.
Drupal 7 has been officially EOL since 5 January 2025.
Drupal 7 has been officially EOL since 5 January 2025.
Looks good!