- 🇺🇸United States damienmckenna NH, USA
One problem here is that there's an assumption on which field name should be used; should it be configurable or something? The main differences between #13 and #19 are in the image field name - #13 uses field_image whereas #19 uses field_media_image.
FWIW we've been using #13 on a production site for a few years.
- 🇺🇦Ukraine _shy Ukraine, Lutsk 🇺🇦
Please, reroll the patch to the latest branch version.
- Status changed to Needs work
over 1 year ago 7:36pm 25 November 2023 - 🇺🇸United States wstocker
Patch re-rolled and updated with Drupal core 9.5.x.
- 🇮🇳India sakthi_dev
The patch provided in #24 not patching the files correctly instead it's creating a patch file inside the directory. As per comment #22 added Needs Reroll to the tags.
- 🇺🇸United States wstocker
@sakthi_dev Whoops apologies wrong file. Here is the updated one.
- Status changed to Needs review
over 1 year ago 3:24pm 9 February 2024 - 🇺🇸United States wstocker
Patch 26 applied, but to Damiens' point there were PHP errors surrounding the new field name in #20.
We had been using patch #13 for several years which has field_image instead of field_media_image.
I think making that configurable is a good idea, but for now, I re-rolled and created patch #28 using patch #13 to start and the errors disappeared.
Patch applies clean to 8.x-1.x.
- 🇺🇸United States wstocker
Patch #28 is incompatible with D10 as it uses deprecated and removed file_create_url().
Refactored so it is compatible with D10 and 3.x. wstocker, patch #29 doesn't work for me.
Drupal 10.2.8.
Videojs 3.x.When I aplied the patch I got the next error:
InvalidArgumentException: Field is unknown. in Drupal\Core\Entity\ContentEntityBase->getTranslatedField() (line 616 of core\lib\Drupal\Core\Entity\ContentEntityBase.php) Drupal\Core\Entity\ContentEntityBase->get() (Line: 146) Drupal\videojs\Plugin\Field\FieldFormatter\VideoJsPlayerListFormatter->viewElements() (Line: 91) Drupal\Core\Field\FormatterBase->view() (Line: 76) Drupal\Core\Field\Plugin\Field\FieldFormatter\EntityReferenceFormatterBase->view() (Line: 268) Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple() (Line: 339) Drupal\Core\Entity\EntityViewBuilder->buildComponents() (Line: 24) Drupal\node\NodeViewBuilder->buildComponents() (Line: 281) Drupal\Core\Entity\EntityViewBuilder->buildMultiple() (Line: 238) Drupal\Core\Entity\EntityViewBuilder->build() call_user_func_array() (Line: 111) Drupal\Core\Render\Renderer->doTrustedCallback() (Line: 859) Drupal\Core\Render\Renderer->doCallback() (Line: 421) Drupal\Core\Render\Renderer->doRender() (Line: 240) Drupal\Core\Render\Renderer->render() (Line: 238) Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 627) Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 239) Drupal\Core\Render\MainContent\HtmlRenderer->prepare() (Line: 128) Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90) Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray() call_user_func() (Line: 111) Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 186) Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76) Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58) Drupal\Core\StackMiddleware\Session->handle() (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28) Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32) Drupal\big_pipe\StackMiddleware\ContentLength->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: 36) Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51) Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704) Drupal\Core\DrupalKernel->handle() (Line: 19)