OK, thanks, now i understand.
It was not clear to me that the problem happens in a Views display.
The hours are displayed correctly n a node list, but not in a Views Display. Strange...
Can you specify a test script?
Also, use latest dev.
Thanks fot your detailed reply.
I still cannot reproduce.have you Upgrade to v1. 26?
Nice! Does the error log report not give a message?
Please specify all settings for 'Manage display' of the field (only the ones that are directly visible - no matter the ones hidden in a field set).
Where do you specify the 'first day of week'? in the field, or in 'Regional settings'?
Are your hours through midnight?
And if you press 'Add time slot' on the Monday, the second slot is not hidden there?
Please find screenshots attached for admin/content view: pre and post Olivero, and for comparison also a Claro screenshot.
I have assured that this view has a full pager.
Please also take a look at the duplicate issues from #9
@decoppel, I can also not reproduce your problem, using the following script
- set 'action buttons' to Workflow config, make sure some transitions have a custom label
- create a node, add 2 files and 2 text items, press action button to save
- edit the node, repeat above.
I always see label(s), and node gets committed each time first time
Cannot reproduce on 'Workflow history tab', since the node fields are not on that page.
Cannot reproduce on 'node view' page for the same reason.
I will wait for spiderman's feedback and then create a new version.
I have some off-topic questions for this co-operative crowd:
- This module lacks tests. Do you have any automated tests to share in
#893294: Add tests →
?
- The attraction for this module is dropping, apparently since core has its 'Workflows' module. You are (still) using this module. You might want to share insights in
💬
Is Workflow redundant now that Content Moderation+Workflows is in core?
Active
I added the info to 💬 Is Workflow redundant now that Content Moderation+Workflows is in core? Active
Including info from 🌱 Comparing Workflow, Workflows, Workbench, Maestro, State Machine, Content Moderations, Workflows fields modules Active and marking that as 'duplicate'.
Please try again.
Sorry for the big commits, hiding the real changes.
Thanks for your efforts. I will keep this issue open for the upcoming contributions.
I did not take over all changes.
I did not update the .js file, since the changes do corrupt the functionality. Please test before contributing.
Please test the dev version and report back. I wil create a new version afterwards.
Strange, I cannot reproduce the error.
Is it dependent on a PHP version?
The patch loose the 'static' performatnce improvement.
Will the following work for you , too?
public function createItem($offset = 0, $value = NULL) {
$day = $value['day'] ?? NULL;
static $plugin_type = 'field_type';
static $pluginManager = NULL;
// Avoid PHP Fatal error: Constant expression contains invalid operations
$pluginManager ??= \Drupal::service("plugin.manager.field.$plugin_type");
@dcoppel, please test again.
Thoroughly, since the patch is bigger than expected. It also uncovered an incorrect workfllowSate::create().
Thanks for all your feedback and patience!
Thanks, fixed in #3514956-8: Introduce Hook classes (as per D11.1) → . Will create a new release in a minute.
Thanks. Version 1.26 is now released.
A new version 1.25 is released.
Thanks for your fast and efficient testing process!
A new version 1.25 is released.
Thanks for your fast and efficient testing process!
This is because of the field settings. You have set (some of the) the following checkmarks:
- Validate hours (Assure that endhours are later then starthours. Please note that this will work as long as both hours are set and the opening hours are not through midnight.)
- Require Start time
- Require End time
Please reopen if you think otherwise.
Please check new release 1.25 (to be released within hours)
Thanks, committed. Will create a new release today.
Thanks, this was an unfortunate typo.
This si sufficiently done in the last years.
johnv → created an issue.
Thanks, committed.
todo : - Title of 'workflow_state_formatter' does not adhere to field settings.
The 'new' view has column headers 'timestamp' and 'User ID'
This is normal. In Preview, the [save] button does not exist. User must return to original, and then save the entity.
Summary is updated accordingly.
Please specify all your Field 'Manage display' settings.
I tested with latest dev version (I was about to release this as new release, but will wait for your response) :
- Number of days to show = Show all days
- First day of week = - system's Regional settings - = Sunday
- Group consecutive days with same hours into one set = YES
This gives the following results:
Sun: Closed
Mon - Fri: 8:30-4:30
Sat: Closed
When changing First day of week to Tuesday, i get the following results.
Mon - Fri: 8:30-4:30
Sat - Sun: Closed
So, I cannot reproduce. Which version are/were you using?
No, that should not be the case. But I see our posts crossed. I Will take a look.
What do you mean with base field? Do you add the field programmatically to a programmed entity? Or as a normal field via field UI?
thanks for your better testing: do not test 0, 1 or 2, but also 3 times|
The cache was not properly updated, resulting an infinite recursive call.
Please try again.
Thanks a lot!
I did needeto add the extra directory for including the .inc files.
Please try again.
Let us rephrase: define user using EntityOwnerTrait.
Thanks for your answer.
Regarding the error, it seems it is another use case of the issue that was created just yesterday: 🐛 Drupal\Core\Field\WidgetBase::errorElement() Active
Please add your comments over there.
I can reproduce, after reading OP carefully.
- create/use a node type with a workflow field as described above.
- Add an unlimited 'Text (plain)' field
- create a new node
- press [Add another item]
Regarding #7:
the dpm is OK, it is a develoment tool, and secured against misuse.
for the deprecation, I created
📌
RenderElement and FormElement base plugin classes are deprecated in 10.3 and removed in 12.0
Postponed
, but postponed until later.
johnv → created an issue.
I do get the following WSOD when dragging the language (langcode) from 'Disabled' to the upper part of the screen:
The website encountered an unexpected error. Try again later.
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "hidden" plugin does not exist. Valid plugin IDs for Drupal\Core\Field\FormatterPluginManager are: comment_username, comment_default, comment_permalink, datetime_custom, datetime_default, datetime_plain, datetime_time_ago, file_link, file_audio, file_extension, file_filemime, file_size, file_uri, file_video, file_default, file_rss_enclosure, file_table, file_url_plain, image, image_url, link, link_separate, office_hours, office_hours_schema_org, office_hours_status, office_hours_table, office_hours_table_details, list_default, list_key, entity_reference_rss_category, text_default, text_summary_or_trimmed, text_trimmed, author, user_name, webform_entity_reference_entity_view, webform_entity_reference_link, webform_entity_reference_url, workflow_default, workflow_state_history, basic_string, boolean, number_decimal, entity_reference_entity_view, entity_reference_entity_id, entity_reference_label, number_integer, language, email_mailto, number_unformatted, string, timestamp_ago, timestamp, uri_link in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of core\lib\Drupal\Component\Plugin\Discovery\DiscoveryTrait.php).
Drupal\Core\Plugin\DefaultPluginManager->getDefinition('hidden') (Line: 57)
Drupal\Core\Field\FormatterPluginManager->createInstance('hidden', Array) (Line: 81)
Drupal\Core\Plugin\DefaultLazyPluginCollection->initializePlugin('hidden') (Line: 80)
Drupal\Component\Plugin\LazyPluginCollection->get('hidden') (Line: 148)
Drupal\Component\Plugin\LazyPluginCollection->getIterator() (Line: 114)
Drupal\Core\Plugin\DefaultLazyPluginCollection->getConfiguration() (Line: 303)
Drupal\Core\Config\Entity\ConfigEntityBase->preSave(Object) (Line: 272)
Drupal\Core\Entity\EntityDisplayBase->preSave(Object) (Line: 529)
Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 484)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 239)
Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object) (Line: 370)
Drupal\Core\Entity\EntityBase->save() (Line: 618)
Drupal\Core\Config\Entity\ConfigEntityBase->save() (Line: 293)
Drupal\Core\Entity\EntityForm->save(Array, Object)
@vvs, @tssarun, does this still happen with current dev? (I will soon release a 1.9 version.)
This is not needed, or even possible. The user is defined as a basefield, and the widget is never part of the screen (The Transition user is always the transition owner is always the current user).
As such, core does not add the basefield widget to the main widget.
And 📌 Use not-randomized drupal-data-selector, not #id Fixed
I did not try to replicatie to problem, yet. It seems identical to a problem i had in another of my modules:
🐛
office_hours.js hides other [Add] buttons in widget
Fixed
Normally, i wait 10 days after finishing a job. Mostly, some early adopters have comments.
So, yes, as zoon as you give me ok, i Will create a new release.
I am very happy with your patience, feedback and above all the coincidence that we work in the same weeks.
I guess we can close this for now.
This should be fixed. Please reopen if not.
Please check latest version. There was a typo, which is now fixed.
This is now solved, after adding a test for isNew().
Thanks for your patience.
I am now looking at "You tried to set a Workflow State, but the entity is not relevant. Please contact your system administrator. ".
When you save the form a second time, the correct value is saved.
I have now finished my work on Workflow module.
Please rebase and run update.php. That will remove the 'Select a value' problem, since the field will be set 'required', leveraging 'BasefieldDefinition'.
The original problem should not happen as well.
I cannot reproduce it using Drupal UI, but I guess the patch does not hurt, either.
Module should now be stable, after runngin update.php.
Tasks left: 1. move submodule hooks and 2. The new 'required' asterisk on transition form is ugly, even it is correct. Perhaps remove it again.
Regarding the user delete (#18), that is now fixed in another issue from #20.
Regarding the initial issue, that should be fixed, the function is now addActionButtons().
Regarding the "choose a value" (#15), please run update.php. The version 1.8 and current dev is trying to leverage the standard core code via baseFieldDefinitions(). The 'required' is now set in the BaseField.
The block config is removed.
I now think that that the other optional config for Action should be removed, too.
I cannot reproduce this. 'Transition labels' are correctly displayed in the selectlist/reios/buttons.
Thanks.
IMO the only needed change is the parameter. The mixup between delete and cancel in intended.
But I am open for test results.
Reading your OP again.
Indeed, the module is only designed with local time in mind.
As stated above, there is a functionality to take the local limezone into account.
However, not yet taking the cache into account when 'Authenticated users' are located in different timezones.
Please assess
🐛
Status field caching still broken
Active
, which could set an inifinite cache max-age, and updating the open/closed status with a JS/Ajax call.
Your cron error might be fixed by 🐛 Cache invalidation of http_response tag when viewing a node with office hours exception (holiday hours) while having jsonapi enabled Active
Is your problem perhaps related to exception days?
@see
🐛
Fix field cache for exception day
Active
The original documentation for D7, I wrote myself, on a new project implementation.
But after some years, I realized I never mentioned I added a patch for the D7 Feeds module in order to get things working.
This shows that the module badly lacks tests....
Indeed, I think we can just forget about adding the yml file.
The block is present, and usable if a site builder wants to add it.
I will remove the file.
Thisis because Widget::massageFormValues() was not properly reproduced.
The patch makes sure that the standard code is re-used, not duplicated.