πŸ‡ΊπŸ‡¦Ukraine @oleksandr.s

Account created on 18 February 2019, almost 6 years ago
#

Recent comments

πŸ‡ΊπŸ‡¦Ukraine oleksandr.s

Thank you for advice, I've created issue fork and created MR.

Also, updated a patch for version 10.3.1

πŸ‡ΊπŸ‡¦Ukraine oleksandr.s

Hi, here is patch for Drupal version 10.3.1. Should work with 10x versions.
Probably also works with 11x versions.

Patch provides client side validation to check file size.

πŸ‡ΊπŸ‡¦Ukraine oleksandr.s

Created MR to add possibility to configure "Maximum upload size" on scorm_field.

πŸ‡ΊπŸ‡¦Ukraine oleksandr.s

Add missed ')'

πŸ‡ΊπŸ‡¦Ukraine oleksandr.s

hi @globexplorer

I would not use `$node = $items->getEnitity();` because with such code entity of another can be fetched, not only entity of `node` type.
For example, when Layout Paragraph used then `$items->getEnitity();` will fetch `paragraph` entity.
Please check `$e` variable on sreenshot.

πŸ‡ΊπŸ‡¦Ukraine oleksandr.s

oleksandr.s β†’ changed the visibility of the branch 3441865-error-attempt-to to hidden.

πŸ‡ΊπŸ‡¦Ukraine oleksandr.s

Hi, I added a fix for this issue by fixing ScormFieldScorFormatter class.

In my case, error happen when use scorm_field with combination of paragraph and used a Layout Paragraphs widget for such paragraph field.
With such combination node object can't be fetched from route, because route is layout_paragraphs.builder.insert

πŸ‡ΊπŸ‡¦Ukraine oleksandr.s

Code changes provided in MR, attached to issue, fix the error.
Tested with Drupal 10.3.1 version

πŸ‡ΊπŸ‡¦Ukraine oleksandr.s

oleksandr.s β†’ changed the visibility of the branch 3465236-cant-install-module to hidden.

πŸ‡ΊπŸ‡¦Ukraine oleksandr.s

oleksandr.s β†’ changed the visibility of the branch 1.0.x to active.

πŸ‡ΊπŸ‡¦Ukraine oleksandr.s

oleksandr.s β†’ changed the visibility of the branch 1.0.x to hidden.

πŸ‡ΊπŸ‡¦Ukraine oleksandr.s

oleksandr.s β†’ changed the visibility of the branch 1.0.x to hidden.

πŸ‡ΊπŸ‡¦Ukraine oleksandr.s

Hi @stmh, thank you for reviewing and testing.

Here is new a patch.

πŸ‡ΊπŸ‡¦Ukraine oleksandr.s

Hi, I have fixed the bug in the MR created here.

Please keep in mind that, while this fixes the bug with undefined $destination variable, you still can't submit the preset creation form due to another bug discussed in [#3314510] πŸ› Entity type 'Drupal\video_transcode\Entity\Preset' is missing 'config_export' definition in its annotation RTBC , also mentioned in #3 πŸ› Warning: Undefined variable $destination in PresetFormBase.php Needs review . To fix preset creation bug,
please implement patch from issue [#3314510] πŸ› Entity type 'Drupal\video_transcode\Entity\Preset' is missing 'config_export' definition in its annotation RTBC

πŸ‡ΊπŸ‡¦Ukraine oleksandr.s

oleksandr.s β†’ made their first commit to this issue’s fork.

πŸ‡ΊπŸ‡¦Ukraine oleksandr.s

Hi, here is patch related to this issue.

1. In patch I modified key for '#states' and added 'table' key. As now, drupal builds field storage settings form using table element $element['allowed_values']['table'] . https://git.drupalcode.org/project/drupal/-/blob/10.2.x/core/modules/opt...

2. In patch I modified 'name' selector of list_predefined_options_plugin_id to control states of allowed_values as now, drupal using subform key wrapper. https://git.drupalcode.org/project/drupal/-/blob/10.2.x/core/modules/fie...

πŸ‡ΊπŸ‡¦Ukraine oleksandr.s

oleksandr.s β†’ changed the visibility of the branch list_predefined_options-3436776 to hidden.

πŸ‡ΊπŸ‡¦Ukraine oleksandr.s

When I was developing this patch I was trying to not break current functionality and keep it the same as it was before.
So If before we had:
BEFORE:

// This gets all answers the current user can view.
$query = $answer_storage->getQuery();
$aids = $query->condition('user_id', $this->getOwnerId())
  ->condition('user_module_status', $this->id())
  ->execute();

then, to make result the same we need to change like this:
AFTER:

Unchanged: This gets all answers the current user can view.
$query = $answer_storage->getQuery();
$aids = $query->condition('user_id', $this->getOwnerId())
  ->condition('user_module_status', $this->id())
  ->accessCheck()
  ->execute();

Please, check this example BEFORE and AFTER https://www.drupal.org/node/3201242 β†’ . It shows the similar query examples but with articles content type and how to achieve the same query results after explicitly calling accessCheck().

Production build 0.71.5 2024