- Issue created by @bogdog400
- Assigned to Grevil
- π©πͺGermany Anybody Porta Westfalica
@Grevil could you please take a look if this can be reproduced or is special?
- Status changed to Postponed: needs info
over 1 year ago 1:32pm 17 August 2023 - π©πͺGermany Grevil
Please make sure to run both
drush updb
anddrush cr
after update and see if the issue still persists. There isn't anything wrong in code, the service arguments simply changed, and the old arguments are still cached. - πΊπΈUnited States bogdog400
Okay. You were correct that I failed to run updb/cr. But I did that and started getting a new error about the caption. (See below.)
I haven't found instructions about where to place this plugin. Indeed, the plugin's instructions suggest using npm which don't really help here.
https://github.com/dimsemenov/photoswipe-dynamic-caption-plugin
Any thoughts? In the same 'libraries/photoswipe/dist/' directory?
The website encountered an unexpected error. Please try again later. ValueError: Path cannot be empty in file_get_contents() (line 76 of modules/contrib/photoswipe/modules/photoswipe_dynamic_caption/photoswipe_dynamic_caption.install). photoswipe_dynamic_caption_requirements() call_user_func_array() (Line: 409) Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}() (Line: 388) Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 416) Drupal\Core\Extension\ModuleHandler->invokeAll() (Line: 109) Drupal\system\SystemManager->listRequirements() (Line: 93) Drupal\system\SystemManager->checkRequirements() (Line: 120) Drupal\system\Controller\SystemController->overview() call_user_func_array() (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 583) Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 166) Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 74) Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58) Drupal\Core\StackMiddleware\Session->handle() (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106) Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85) Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 51) Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704) Drupal\Core\DrupalKernel->handle() (Line: 19)
- Status changed to Fixed
over 1 year ago 1:35pm 21 August 2023 - π©πͺGermany Grevil
Please take a look at the README.md of the submodule: https://git.drupalcode.org/project/photoswipe/-/blob/5.x/modules/photosw...
There everything is explained. Thanks for pointing out, that this information is indeed missing on the module page! I'll adjust it accordingly!
- Status changed to Closed: works as designed
over 1 year ago 1:38pm 21 August 2023 - πΊπΈUnited States bogdog400
BTW, I tried to install the plugin using the composer command listed in the docs and I got this error:
composer require "npm-asset/photoswipe-dynamic-caption-plugin:^1.2" Do not run Composer as root/super user! See https://getcomposer.org/root for details Continue as root/super user [yes]? Info from https://repo.packagist.org: #StandWithUkraine ./composer.json has been updated Running composer update npm-asset/photoswipe-dynamic-caption-plugin Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires npm-asset/photoswipe-dynamic-caption-plugin, it could not be found in any version, there may be a typo in the package name. Potential causes: - A typo in the package name - The package is not available in a stable-enough version according to your minimum-stability setting see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details. - It's a private package and you forgot to add a custom repository to find it Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems. Installation failed, reverting ./composer.json and ./composer.lock to their original content.
The command line was copied from here:
https://git.drupalcode.org/project/photoswipe/-/blob/5.x/modules/photosw...
- πΊπΈUnited States bogdog400
But cloning it directly worked fine:
git clone https://github.com/dimsemenov/photoswipe-dynamic-caption-plugin.git
Thanks!
- π©πͺGermany Grevil
Hey @bogdog400!
You need to activate the use of third party libraries for composer!Enable usage of third-party libraries using composer, see here for an explanation.
https://www.drupal.org/docs/develop/using-composer/using-composer-to-ins... β .