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

stewest created an issue. See original summary.

stewest’s picture

I 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;

stewest’s picture

Status: Active » Closed (outdated)
mishac’s picture

I'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.

eric115’s picture

Component: User interface » Code
Status: Closed (outdated) » Active

This definitely shouldn't have been closed and is still a bug.

This module shouldn't need colorbox to work correctly

anish.a’s picture

StatusFileSize
new320 bytes

This 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.php

class 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.

mezitlab’s picture

would be great to add that dependency or remove the gallery support from the video types, because this is a pretty annoying issue this way.

eric115’s picture

Status: Active » Needs review
StatusFileSize
new3.69 KB

Here is a patch to remove colorbox dependency

Status: Needs review » Needs work

The last submitted patch, 8: 2794479-8.patch, failed testing. View results

  • Eric115 committed d683197 on 8.x-1.x
    Issue #2794479 by Eric115, anish.a, stewest: You have requested a non-...
eric115’s picture

Status: Needs work » Fixed

Bot failure seems to be unrelated. I've committed this to the dev version for now.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.