- π¬π·Greece s.messaris
After using this for a good while without problems, I run into a problem with revisions. I am adding an updated patch with some code from
\Drupal\entity_reference_revisions\Plugin\Field\FieldFormatter\EntityReferenceRevisionsFormatterBase::prepareView()
- Status changed to Postponed: needs info
almost 2 years ago 4:09pm 30 January 2023 - π¨πSwitzerland cburschka
I haven't touched this module in a while, and am currently trying to relearn the structure.
I see there is already
rest_views_revisions
submodule with anentity_reference_revisions_export
field formatter that its PHPdoc comment claims "exports the rendered entity" of an entity_reference_revisions field.Does that one not fulfil the functionality needed here? As far as I can tell, the inheritance chain here is:
- core EntityReferenceFormatterBase (ERFB) is the base class for entity reference formatters.
- core EntityReferenceEntityFormatter (EREF) extends ERFB and is the base class for displaying entity reference as rendered entity.
- rest_views EntityReferenceExportFormatter (ERXF) extends EREF.
- entity_reference_revisions EntityReferenceRevisionsEntityFormatter (ERREF) extends EREF.
- rest_views_revisions EntityReferenceRevisionsExportFormatter (ERRXF) extends ERXF, *and* simultaneously wraps an instance of ERREF, as an adapter. It does this to delegate the ::prepareView() call to entity_reference_revisions' ERREF (similar to what this patch copy-pastes into the main ERXF), while allowing its actual parent ERXF to handle the ::view() call. - π¬π§United Kingdom joekers UK
@cburschka I think what you're saying is right - the sub-module should cover entity reference revisions, however in my case, on the export nothing is printing for this type of entity. I'm not sure if it's best to create a new issue for it?
- πΊπΈUnited States nicxvan
I am moving support to version 3, can you please confirm if this issue still exists in version 3.
If it does still exist please change the version dropdown to 3.0.x and set the status to Needs Work.There is a submodule in version 3 for this that should cover your use case.
Thank you!
- Status changed to Closed: cannot reproduce
9 months ago 1:25am 21 March 2024 - πΊπΈUnited States nicxvan
I've confirmed that paragraphs work in version 3. Please reopen this if you experience this on the latest version.