Patch #32 works perfect, using 2.1.4 with Drupal 10.3.5
stijnd β created an issue.
@99gs3 I also noticed this but now you can use the "Between" operator to set a weight range.
Thanks for the work everyone. Happy to see this patch can be ditched after 6 years!
Using Drupal 10.2. Also had problems with created/changed date and smart_date module. #15 fixed the issue.
The combination of #18 and #23 also worked for me. Perfectly explained by @nkraft!
Correct. This improves reading for the users in my opinion because in my case it's always morning/afternoon.
At the moment of developing the project this was not possible with the Table formatter so I decided to use the Plain text formatter with some styling.
I understand your comment regarding the delta. Weird I add a comment in the second slot and it is saved as first delta, instead of second, but I can find me in 'Works as designed'.
Digged in quite deep and I've seen this is not an easy one.
What I don't understand is the empty time slot. For my use case it's necessary the "not empty comment" is stored because this generated a kind of table for the morning/afternoon (with the Plain text Formatter):
Morning / afternoon
Monday: - 13 until 17h
Tuesday: 8 until 12 -
If there's another solution of doing this I'm missing out on something. Nevertheless, in the older version of the module this was possible by leaving the timeslot empty and adding a comment. I hope I'm not the only one who used this module like this :-)
Had another look at this one.
According to me there's a storage problem. The deltas are wrong. See attached screenshots. I can't see where's the issue in the Widget for now.
The issue is not fixed on the current dev version.
stijnd β created an issue.
Had the same issue. Tested this with and without available Workflows. This gives the same result.
Fixed it by returning an empty array for the getSettableOptions function of the StateItem FieldType when the field does not exist on the entity. This results in the ability to create the field.
stijnd β made their first commit to this issueβs fork.
Had the same issue. Each time cache is cleared the first generated PDF has no style.
The hook_preprocess_entity_print() suggestion of @gpapadas did the trick.
Here's my fix. It reads the CSS file and adds its content as a style-tag
/**
* Implements hook_preprocess_HOOK().
*/
function custom_module_preprocess_entity_print(&$variables) {
$css = file_get_contents(\Drupal::service('extension.path.resolver')->getPath('module', 'custom_module') . '/css/entity-print-style.css');
$variables['#attached']['html_head'][] = [
[
'#tag' => 'style',
'#value' => $css,
],
'custom_module',
];
}
Patch works perfect for my use case but it might need some more testing with multiple Order types (with different workflows).