Comments

azinck created an issue. See original summary.

azinck’s picture

Status: Active » Needs review
StatusFileSize
new3.26 KB

Here's a first stab. Apologies if I've overlooked something obvious. I haven't tested this with multi-lingual. Most of my testing has been rendering revisions of paragraph entities.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

bburg’s picture

I'm in the process of trying to upgrade from 8.4 to 8.5+ (security update scheduled for today). I'm running into this error on a site that uses the above patch:

2018/08/01 16:42:37 [error] 2436#0: *174 FastCGI sent in stderr: "PHP message: Uncaught PHP Exception Drupal\Component\Plugin\Exception\PluginNotFoundException: "The "entity_revision:paragraph_revision" plugin does not exist." at /vagrant/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php line 52" while reading response header from upstream, client: 10.0.2.2, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "localhost:8081"

So it looks like it is failing to find a plugin definition for the generated plugin name.

bburg’s picture

Silly me, I was running into this error because I forgot to re-apply this patch. Re-applying seems to fix the issue.

blazey’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

Thanks for the patch! It works well with 8.6.2, we'll need some test coverage to RTBC it though.

matthiasm11’s picture

Used the patch with success.
Got the same error as bburg due to misconfiguration in the view while trying lots of different approaches before I found this issue. A config import and cache rebuild fixed the issue.

One code remark, the label should be translated:
'title' => $entity_type->getLabel() .' Revision',
should become
'title' => $entity_type->getLabel() . ' ' . t('revision'),

Kind regards

Matthias

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

caesius’s picture

Patch no longer applies as of Drupal 8.8.x-alpha1. This needs to be rerolled against 8.9.x, reviewed, and then hopefully committed.

nick dewitte’s picture

Status: Needs work » Needs review
StatusFileSize
new3.82 KB

Rerolled the patch against 8.9.x, applied remark from #9.

Status: Needs review » Needs work

The last submitted patch, 13: 2883981_13.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

nick dewitte’s picture

Status: Needs work » Needs review
StatusFileSize
new3.82 KB

Fixed coding standard messages. Ignored deprecation notices as they aren't introduced by this patch.

Status: Needs review » Needs work

The last submitted patch, 15: 2883981_14.patch, failed testing. View results

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

bburg’s picture

Rerolled patch. I'm not too sure where DeprecatedServicePropertyTrait came from in the previous patch file. It's not present in 9.2.5.

Anyway. This patch will work on 9.2.5.

bburg’s picture

Ok, with that last patch, I'm getting this:

Fatal error: Uncaught Error: Call to a member function hasHandler() on null in /var/www/html/web/core/modules/views/src/Plugin/Derivative/ViewsEntityRow.php:105
Stack trace:
#0 /var/www/html/web/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(101): Drupal\views\Plugin\Derivative\ViewsEntityRow->getDerivativeDefinitions(Array)
#1 /var/www/html/web/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(87): Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array)
#2 /var/www/html/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(284): Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
#3 /var/www/html/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(175): Drupal\Core\Plugin\DefaultPluginManager->findDefinitions()
#4 /var/www/html/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php(22): Drupal\Core\Plugin\DefaultPluginManager->getDefinitions()
#5 /var/www/html/web/core/lib/Drupal/Core in /var/www/html/web/core/modules/views/src/Plugin/Derivative/ViewsEntityRow.php on line 105
bburg’s picture

This patch should fix the errors in the previous comment.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

b-prod’s picture

@bburg Your patch seems to work fine for row plugin, but it does not seem to cover basic cases for paragraphs.

Imagine you have a page using a revision field for paragraphs. Those paragraphs also use a revision field to another paragraph.

With such common case, we need to be able to render a paragraph revision as a field, so we can have :

  • an argument "revision ID" for the parent paragraph
  • a relationship from the parent paragraph to the child paragraphs
  • a field "rendered entity revision" for the child paragraphs

With the row plugin only, we could use an inverse relationship, but this no more work as soon as we reuse paragraph entities, for example when working with paragraphs library module.

Do you think you could add such a feature in your patch?

ravi.shankar’s picture

StatusFileSize
new3.8 KB
new1.96 KB

Fixed Drupal CS issue of patch #22.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

bobooon’s picture

Status: Needs work » Needs review
StatusFileSize
new5.24 KB
new1.44 KB

Tweaked TranslationLanguageRenderer to key the build array by revision ID when type is revisionable. Otherwise, the row plugin renders the first (or initial) revision in each revision row instead of the loaded revision.

bobooon’s picture

StatusFileSize
new5.17 KB
new718 bytes

Removed unnecessary debug typehint.

bobooon’s picture

StatusFileSize
new4.87 KB

Re-rolled for 9.5.x.

google01’s picture

Unfortunately this patch no longer applies as of Drupal 9.5.1

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new144 bytes

The Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

bobooon’s picture

Status: Needs work » Needs review

Patch in #30 still applies cleanly on 9.5.9.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new85 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

bobooon’s picture

Status: Needs work » Needs review
StatusFileSize
new5.06 KB

Re-rolled.

bobooon’s picture

StatusFileSize
new5.06 KB

Fixed patch filename.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs issue summary update

Was previously tagged for tests which are still needed.

Also issue summary appears incomplete.

_utsavsharma’s picture

StatusFileSize
new1.11 KB
new5.05 KB

Tried to fix failures in #37.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.