When I try to change the display formatter for a video_embed_field to Magnific PopUp, the Ajax loading image spins and hangs with this error in the console and logs.
http://mysite.../admin/structur…aragraphs_type/large_video/display?ajax_form=1&_wrapper_format=drupal_ajax Failed to load resource: the server responded with a status of 500 (Internal Server Error)
ajax.js?v=8.1.8:965 Uncaught AjaxError:
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /admin/structure/paragraphs_type/large_video/display?ajax_form=1
StatusText: Internal Server Error
ResponseText: {"message":"A fatal error occurred: You have requested a non-existent service \u0022colorbox.attachment\u0022."}
Logs.
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "colorbox.attachment". in Drupal\Component\DependencyInjection\Container->get() (line 157 of /var/www/mysite.com/public_html/web/core/lib/Drupal/Component/DependencyInjection/Container.php).
Comments
Comment #2
stewestI installed https://www.drupal.org/project/colorbox to see what would happen and it works.
I look then in the module code for Magnific and saw this in \Drupal\magnific_popup\Plugin\Field\FieldFormatter\VideoEmbedField.
Ln8: namespace Drupal\magnific_popup\Plugin\Field\FieldFormatter;
Ln10: use Drupal\video_embed_field\Plugin\Field\FieldFormatter\Colorbox;
Comment #3
stewestComment #4
mishac commentedI'm running into this issue too. I'm not sure I understand why it's marked as "closed (outdated)" given that it still occurs?
If colorbox is required it should probably be set as a dependency, or it should be removed.
Comment #5
eric115 commentedThis definitely shouldn't have been closed and is still a bug.
This module shouldn't need colorbox to work correctly
Comment #6
anish.a commentedThis when combined with the video_embed field module creates the issue. That module doesn't have the colorbox as a dependency because its optional.
Since none of the module doesn't add itself as its dependency, its creating the issue.
By the way, we are using the colorbox from here.
src/Plugin/Field/FieldFormatter/VideoEmbedField.phpclass VideoEmbedField extends Colorbox {So, there should be a solution. Effectively, this module won't work for video if colorbox module is not installed.
Adding my previous patch anyway.
Comment #7
mezitlab commentedwould be great to add that dependency or remove the gallery support from the video types, because this is a pretty annoying issue this way.
Comment #8
eric115 commentedHere is a patch to remove colorbox dependency
Comment #11
eric115 commentedBot failure seems to be unrelated. I've committed this to the dev version for now.