Problem/Motivation

Remove rdf from core

Steps to reproduce

Proposed resolution

Check for @todo
Bye bye RDF

Remaining tasks

Patch
Review
Commit

User interface changes

API changes

Data model changes

Release notes snippet

RDF has been removed from core in 10.0.0.

RDF was previously installed as part of the standard install profile, but many sites do not use the functionality it provides. If you are not sure what RDF is, it is likely that you can safely uninstall it.

If you want to keep using the functionality provided by RDF, read the recommendations for RDF.

Issue fork drupal-3267515

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quietone created an issue. See original summary.

quietone’s picture

quietone’s picture

Issue tags: +Needs release note
quietone’s picture

Issue tags: +Needs change record
longwave’s picture

Title: Remove RDF from core » [PP-1] Remove RDF from core
Status: Active » Postponed
Related issues: +#3243121: Remove RDF module from the Standard profile

We cannot do this until #3243121: Remove RDF module from the Standard profile is completed.

longwave’s picture

Title: [PP-1] Remove RDF from core » Remove RDF from core
Status: Postponed » Active

The dependency landed so we can move forward with this.

longwave’s picture

Title: Remove RDF from core » [PP-2] Remove RDF from core

Actually let's postpone on
#3293813: Move RDF-related tests to RDF module
#3267703: Deprecate RDF module

as both of those will clash with a removal.

longwave’s picture

Status: Active » Postponed
longwave’s picture

Title: [PP-2] Remove RDF from core » Remove RDF from core
Status: Postponed » Active

The test refactoring landed, and we are proceeding with deprecations and removals in parallel for other modules, so there is no reason for this to be postponed.

longwave’s picture

Status: Active » Needs review

First pass. There are a bunch of comments that refer to RDFa, and even example code in entity.api.php and theme.api.php, that I'm not sure if we should remove here or not.

There are also two Views plugins that need decoupling from RDF - this might need to be migrated to the module itself, although I'm not sure that this seemingly niche feature is worth keeping:

core/modules/node/src/Plugin/views/row/Rss.php:    elseif (function_exists('rdf_get_namespaces')) {
core/modules/views/src/Plugin/views/row/RssFields.php:    if (function_exists('rdf_get_namespaces')) {

Spokje made their first commit to this issue’s fork.

Spokje’s picture

Assigned: Unassigned » Spokje
Status: Needs review » Needs work

Meh, made a mistake in the filled fixture apparently.

Spokje’s picture

Assigned: Spokje » Unassigned
Status: Needs work » Needs review
phenaproxima’s picture

Checked out the branch and ran find . -name rdf, find . -name '*rdf*', and find . -name 'rdf*'. Nothing.

grep -irn rdf core --exclude-dir node_modules --exclude-dir core/assets/vendor, on the other hand, reveals a few stragglers:

core/misc/cspell/dictionary.txt:393:easyrdf
core/.cspell.json:20:      "modules/rdf/tests/fixtures/drupal7.php",
core/includes/theme.inc:1571:    // Modules (e.g., rdf.module) can add field item attributes (to
core/.deprecation-ignore.txt:8:# Skip EasyRdf deprecations for PHP 8.1 - fixed by
core/.deprecation-ignore.txt:9:# https://github.com/easyrdf/easyrdf/pull/384.
core/.deprecation-ignore.txt:10:%Return type of EasyRdf\\.* should either be compatible with .*, or the #\[\\ReturnTypeWillChange\] attribute should be used to temporarily suppress the notice%
core/lib/Drupal/Core/Render/theme.api.php:588:  // This example is from rdf_preprocess_image(). It adds an RDF attribute
core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php:205:      // @todo Remove RDF in https://www.drupal.org/node/3267515
core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php:206:      'RDF',

core/modules/tracker/tests/fixtures/drupal7.php mentions RDF a bunch, but since that module is also going away (IIRC), doesn't matter.

There are also some places in other modules that integrate with RDF and explicitly mention it, like:

core/modules/node/node.module:548:    // Used by RDF to add attributes around the author and date submitted.

Presumably we'll remove these things in a follow-up (or leave them there)? That probably needs committer input.

Spokje’s picture

Thanks @phenaproxima

Removed:

core/.cspell.json:20:      "modules/rdf/tests/fixtures/drupal7.php",
core/.deprecation-ignore.txt:8:# Skip EasyRdf deprecations for PHP 8.1 - fixed by
core/.deprecation-ignore.txt:9:# https://github.com/easyrdf/easyrdf/pull/384.
core/.deprecation-ignore.txt:10:%Return type of EasyRdf\\.* should either be compatible with .*, or the #\[\\ReturnTypeWillChange\] attribute should be used to temporarily suppress the notice%
core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php:205:      // @todo Remove RDF in https://www.drupal.org/node/3267515

Note: The actual missing_path in core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php should IMHO remain, since removing it will fail the test (we did the same for the color module).

Reran yarn spellcheck:make-drupal-dict, which got rid of core/misc/cspell/dictionary.txt:393:easyrdf.

As pointed out by @longwave in #11 there are still some Views stuff and code examples left.

Waiting on a passing committer for guidance on those. Personally I would like to get rid of them as much of possible.

Spokje’s picture

Assigned: Unassigned » Spokje
Status: Needs review » Needs work

Needs a rebase and updated fixtures after #3227033: Remove Quick Edit from core landed.

Spokje’s picture

Assigned: Spokje » Unassigned
Status: Needs work » Needs review

Well, that could have gone smoother, but we're back in the green.

phenaproxima’s picture

Status: Needs review » Needs work
Related issues: +#3307138: Move core's Views integration into this module

We can remove the RDF integration from \Drupal\node\Plugin\views\row\Rss::render; I fixed it in the contrib module (#3307138: Move core's Views integration into this module). Setting to "needs work" for that, for starters.

Spokje’s picture

Also needs a fixtures update.

Shouldn't #19 be a separate issue and shouldn't the deprecation issue for rdf and this issue be postponed on that as well?

quietone’s picture

Integrations are supposed to be removed before the deprecation, yes.

So the problem in #19 should be a child issue of the deprecation issue, #3267703: Deprecate RDF module. I haven't looked at the problem. Is there a reason it must be done here in 10 instead of in 9.5?

Spokje’s picture

Assigned: Unassigned » Spokje

I love the smell of failing fixture updates in the morning.
.
..
...
O wait, I don't :/
Looking into it.

catch’s picture

I just got a bit over-excited and committed #3267703: Deprecate RDF module because it was RTBC and nice and simple, I see as usual the complexity is over here.

The main reason we've been moving integrations to modules before deprecating them is to ensure that the module actually still works in contrib after a subtree split. Given #3307138: Move core's Views integration into this module is already in the contrib module that's not an issue, but it leaves 9.5.x in a slightly odd state with Views providing support for a deprecated module.

I've gone ahead and opened #3307230: Backport RDF/views integration changes to 9.5.x and I think we have a couple of choices:

1. Postpone this issue on #3307230: Backport RDF/views integration changes to 9.5.x (which we'd commit to all active branches) so that this issue doesn't have to touch the views integration.

2. Commit this issue to 10.0.x, and commit #3307230: Backport RDF/views integration changes to 9.5.x to 9.5.x independently.

Either way we have two issues to deal with, so... no strong preference but let's try to do the simplest/least confusing route if we can.

Spokje’s picture

Assigned: Spokje » Unassigned
Status: Needs work » Needs review
Spokje’s picture

Rrrrrrrrrrrrrrrrrrrrrrerolled after #3307230: Backport RDF/views integration changes to 9.5.x landed.

Spokje’s picture

Unsure what to do about the remaining RDF references:

https://git.drupalcode.org/project/drupal/-/blob/10.0.x/core/modules/vie...

IMO we should nuke it and open an issue against contrib RDF and leave it like that.

#3307283: Reinstate deleted Views RSSField integration

This wasn't even added when RDF came into core, it was added to Views in contrib before Views was added to core.

@catch in https://drupal.slack.com/archives/C014CT1CN1M/p1662032414511219?thread_t... and https://drupal.slack.com/archives/C014CT1CN1M/p1662032449939259?thread_t...
https://git.drupalcode.org/project/drupal/-/blob/10.0.x/core/modules/lin...

I think is generic attributes support that at the time it was added was only needed for RDF (and still might be), but at this point just needs the comment updating.

@catch in https://drupal.slack.com/archives/C014CT1CN1M/p1662032187209529?thread_t...
https://git.drupalcode.org/project/drupal/-/blob/10.0.x/core/modules/nod...

we can just update the comment/remove the comment.

@catch in https://drupal.slack.com/archives/C014CT1CN1M/p1662032272512639?thread_t...

Spokje’s picture

Added release note snippet

Spokje’s picture

Issue tags: -Needs change record

Added draft CR

phenaproxima’s picture

Status: Needs review » Reviewed & tested by the community

OK, well, I pulled this branch down again and ran the same checks as I did in #15. This time it came back clean, except for some stuff in the migration fixtures, which I assume is okay.

Sooo...is there anything left to do here? We have a release note, a change record, and RDF seems to be out of the code base.

Nah, I'm calling it. This is RTBC once tests pass.

Spokje’s picture

  • catch committed fa8327f on 10.0.x
    Issue #3267515 by Spokje, longwave, quietone, phenaproxima: Remove RDF...
  • catch committed cee6b9c on 10.1.x
    Issue #3267515 by Spokje, longwave, quietone, phenaproxima: Remove RDF...
catch’s picture

Status: Reviewed & tested by the community » Fixed

We still have #3307283: Reinstate deleted Views RSSField integration open against the contrib module, however that functionality isn't central to RDF at all, which was about adding microdata to web pages rather than RSS feeds, so not letting untested functionality added to Views contrib several years before it was added to core hold this up.

Committed/pushed to 10.1.x and cherry-picked to 10.0.x, thanks!

Status: Fixed » Closed (fixed)

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