- Issue created by @RoSk0
- 🇳🇿New Zealand RoSk0 Wellington
The problem looked simple at the first glance - not initialised
extensions
property, but when I fixed this and hit save it told me thatconfig_export
is missing on the ConfigEntity, which is this https://www.drupal.org/node/2949023 → change record for Drupal 8.6.Than it thrown
TypeError: Drupal\file_downloader\DownloadOptionPluginBase::addContextAssignmentElement(): Argument #1 ($plugin) must be of type Drupal\Core\Plugin\ContextAwarePluginInterface, Drupal\file_downloader\Plugin\DownloadOption\OriginalFile given, called in /app/web/modules/contrib/file_downloader/src/DownloadOptionPluginBase.php on line 118 in Drupal\file_downloader\DownloadOptionPluginBase->addContextAssignmentElement() (line 37 of /app/web/core/lib/Drupal/Core/Plugin/ContextAwarePluginAssignmentTrait.php)
at me on the edit screen...Fixed that , and than it was time of
Error: Call to undefined method Drupal\Core\File\FileSystem::getScheme() in Drupal\file_downloader\DownloadOptionPluginBase->deliver() (line 71 of modules/contrib/file_downloader/src/DownloadOptionPluginBase.php).
, which is this https://www.drupal.org/node/3035273 → change record for Drupal 8.8...It looks like this module wasn't tested with Drupal 9 at all...
Will run an full compatibility check a bit later and do some more testing.
- Issue was unassigned.
- Status changed to Needs review
almost 2 years ago 5:18am 22 February 2023 - 🇳🇿New Zealand RoSk0 Wellington
What was done/changed:
ContextAwarePluginInterface
interface added to the list of implemented by theDownloadOptionPluginBase
class (was implemented viaContextAwarePluginTrait
)- replaced file system service with stream wrapper manager services in
DownloadOptionPluginBase
andDrupal\file_downloader\Plugin\DownloadOption\ImageStyle
classes - Extended config entity type annotation with the
config_export
property , listing all the properties from the configuration schema - set default value for the list of allowed extensions for the download option
- Status changed to Needs work
almost 2 years ago 9:19am 22 February 2023 - 🇮🇳India rassoni Bangalore
Clicking the "Add Download option config" link the /admin/config/media/download_options/add page results in : issue resolved. But when we tried to add any download option then issue are coming.
The website encountered an unexpected error. Please try again later. Drupal\Core\Config\Schema\SchemaIncompleteException: Entity type 'Drupal\file_downloader\Entity\DownloadOptionConfig' is missing 'config_export' definition in its annotation in Drupal\Core\Config\Entity\ConfigEntityBase->toArray() (line 253 of core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php). Drupal\Core\Config\Entity\ConfigEntityStorage->mapToStorageRecord(Object) (Line: 273) Drupal\Core\Config\Entity\ConfigEntityStorage->doSave('small', Object) (Line: 520) Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 253) Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object) (Line: 339) Drupal\Core\Entity\EntityBase->save() (Line: 608) Drupal\Core\Config\Entity\ConfigEntityBase->save() (Line: 152) Drupal\file_downloader\Form\DownloadOptionConfigForm->save(Array, Object) call_user_func_array(Array, Array) (Line: 114) Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 52) Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 595) Drupal\Core\Form\FormBuilder->processForm('download_option_config_add_form', Array, Object) (Line: 323) Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73) Drupal\Core\Controller\FormController->getContentResult(Object, Object) call_user_func_array(Array, Array) (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580) Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106) Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85) Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23) Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Steps to reproduce
- Install the latest 2.0.1version of this module
- Enable it
- Navigate to the /admin/config/media/download_options/add page
when tried to add any option issues are coming
- 🇳🇿New Zealand RoSk0 Wellington
Have you applied the patch correctly? Have you cleared the cache after that?
I've already tested it on two different code bases - works as expected.
- Assigned to omkar_yewale
- Issue was unassigned.
- Status changed to RTBC
almost 2 years ago 10:03am 22 February 2023 - 🇮🇳India omkar_yewale Mumbai
Thanks for the patch. The patch was applied successfully and is working as expected after clearing the cache.
Moving RTBC. - @rashmisoni opened merge request.
- 🇮🇳India rassoni Bangalore
Thanks @RoSk0, After clear cache working as expected. Please review screenshot for more reference,hence created MR.
- 🇳🇿New Zealand ericgsmith
Rerolling against 3.0.0
The same issue is present on the 3.0.0 branch - I am rather disheartened that a new 3.0.0 version has been released with this issue still present and no engagement from the maintainers on this issue despite it being RTBC'd for over 6 months.