Closed (fixed)
Project:
Viewfield
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Jun 2017 at 14:15 UTC
Updated:
3 Sep 2019 at 19:34 UTC
Jump to comment: Most recent, Most recent file


Comments
Comment #2
john cook commentedAfter looking into this problem, it turns out that the default normalizer for reference field (which viewfield entries are one of) only use the target_id value from the imported data.
I've created a new normalizer for viewfield entries to fill in the missing data.
This should also fix any service based importing of viewfields.
Comment #3
socialnicheguru commentedOn Drupal 8.4.2 I think the hal module is a dependency now
Error here:
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: The [error]
service "viewfield.entity_reference_item" has a dependency on a non-existent service
"hal.link_manager". in
drupal-8.4.0/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php:58
Comment #4
maxilein commentedComment #5
jerdavisHAL is not required for the export of normal entity reference fields. I'd like to understand why we can't affect this without enabling HAL? If we have to enable HAL, I'd almost prefer that this be moved into a sub module so it was optional to enable it. I'd like to have further discussion here prior to merging this.
Comment #6
maxilein commentedI think I had this error simply after upgrading or enabling of the module ... I never imported anything.
Enabling HAL made the error go away.
Comment #7
jerdavisYou wouldn't get this error with Viewfield unless you applied the patch on this issue which requires HAL. My point was that HAL isn't required to be enabled for Entity Reference fields, so I'd hoped we could provide an alternative solution for this issue that didn't require HAL to be enabled. Baring that, I'd ask that this patch be split and added to a sub-module for API integration for Viewfield so it's not required on all sites. A site that isn't using API access or default content with Viewfield shouldn't require this code or the HAL module being enabled.
Comment #9
jerdavisReworked to follow Entity Reference Revision's methodology and include a ViewfieldServiceProvider class that will conditionally provide a service definition based on the enabled state of the HAL module.