Problem/Motivation

In #2152459: [Policy] Deprecate RDF module and move it to contrib we are considering removing RDF from core entirely. The world has moved on to newer formats such as JSON-LD, but we still ship RDF module in the Standard profile and as such it is apparently used on 80% of Drupal sites, although we assume that most don't even know what it does or that they have it installed at all (see #3158669: [policy, no patch] By default deprecate non-experimental modules that are used by less 5% of sites before the next major version for more discussion on this).

Steps to reproduce

Proposed resolution

Remove RDF module from the Standard profile for Drupal 10.
Check usage during the Drupal 10 lifecycle and consider removing RDF module in Drupal 11.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

The RDF module is slated for removal from core in Drupal 10. To this end, RDF has been removed from the Standard profile in Drupal 9.4.0. This change does not affect existing sites, only new sites installing the Standard profile for the first time. For more information, see the change record on RDF's removal from the Standard profile.

CommentFileSizeAuthor
#49 3243121-d10-49.patch11.2 KBalexpott
#49 3243121-d9-49.patch14.54 KBalexpott
#49 46-49-interdiff.txt2.61 KBalexpott
#48 3243121-d10-48.patch7.77 KBalexpott
#48 3243121-d9-48.patch11.12 KBalexpott
#48 46-48-interdiff.txt3.27 KBalexpott
#46 3243121-d10-46.patch9.72 KBalexpott
#46 3243121-d9-46.patch13.06 KBalexpott
#46 42-46-interdiff.txt4.09 KBalexpott
#42 interdiff_40-42.txt3.74 KBspokje
#42 3243121-d10-42.patch9.11 KBspokje
#40 3243121-d10-40.patch11.21 KBspokje
#39 35-39-interdiff.txt309 bytesskipper-vp
#39 3243121-39.patch12.45 KBskipper-vp
#35 interdiff_27-35.txt22.84 KBspokje
#35 3243121-35.patch12.45 KBspokje
#28 afterpatch.png91.99 KBrinku jacob 13
#28 beforepatch.png100.68 KBrinku jacob 13
#27 reroll_diff_3243121-26_3243121-27.txt2.63 KByogeshmpawar
#27 3243121-27.patch29.28 KByogeshmpawar
#26 interdiff_3243121_24-26.txt426 bytesandregp
#26 3243121-26.patch29.27 KBandregp
#24 reroll_diff_3243121-21_3243121-24.txt7.51 KByogeshmpawar
#24 3243121-24.patch28.71 KByogeshmpawar
#21 3243121-21.patch29.3 KBspokje
#21 interdiff_3243121_16-21.txt2.54 KBspokje
#18 3243121-18.patch29.28 KBspokje
#18 interdiff_3243121_16-18.txt2.52 KBspokje
#16 reroll_diff_3243121_11_3243121_16.txt3.46 KByogeshmpawar
#16 3243121-16.patch25.96 KByogeshmpawar
#11 3243121-11.patch25.96 KBlongwave
#9 interdiff.3243121.7-9.txt1.27 KBlongwave
#9 3243121-9.patch25.87 KBlongwave
#7 interdiff.3243121.6-7.txt20.79 KBlongwave
#7 3243121-7.patch25.28 KBlongwave
#6 interdiff_1-6.txt477 bytesspokje
#6 3243121-6.patch4.49 KBspokje
#4 3243121.patch3.84 KBlongwave

Comments

longwave created an issue. See original summary.

larowlan’s picture

chi’s picture

longwave’s picture

Version: 9.3.x-dev » 9.4.x-dev
Status: Active » Needs review
StatusFileSize
new3.84 KB

Kicking this off. I guess if we remove this from Standard we should also remove it from Umami?

Status: Needs review » Needs work

The last submitted patch, 4: 3243121.patch, failed testing. View results

spokje’s picture

StatusFileSize
new4.49 KB
new477 bytes

Stab at making TestBot go green.

longwave’s picture

Status: Needs work » Needs review
StatusFileSize
new25.28 KB
new20.79 KB

Status: Needs review » Needs work

The last submitted patch, 7: 3243121-7.patch, failed testing. View results

longwave’s picture

Status: Needs work » Needs review
StatusFileSize
new25.87 KB
new1.27 KB
andypost’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll
longwave’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new25.96 KB
andypost’s picture

I think it needs release snippet and change record, otherwise RTBC

longwave’s picture

quietone’s picture

Ah, thanks for making this issue. I've have updated Module or theme removal process to add a step for removing the module from profiles.

quietone’s picture

I am pretty sure the 'Needs product manager review' tag can be removed. All the sign offs happened in the policy issue. Specifically the product manager approval was given in #2152459-79: [Policy] Deprecate RDF module and move it to contrib and the tag removed in the following comment. Removing RDF from the standard profile is a natural consequence of that decision. Therefor, removing the tag.

yogeshmpawar’s picture

StatusFileSize
new25.96 KB
new3.46 KB

Rerolled patch against 9.4.x branch & reroll diff added.

Status: Needs review » Needs work

The last submitted patch, 16: 3243121-16.patch, failed testing. View results

spokje’s picture

StatusFileSize
new2.52 KB
new29.28 KB

Greenifying TestBot.

spokje’s picture

Issue summary: View changes
Issue tags: +9.4.0 release notes

Added draft CR and Release note snippet.

spokje’s picture

Assigned: Unassigned » spokje
spokje’s picture

Assigned: spokje » Unassigned
StatusFileSize
new2.54 KB
new29.3 KB
spokje’s picture

Status: Needs work » Needs review
andypost’s picture

Status: Needs review » Reviewed & tested by the community

Changes looking good, CR filed, release note is valid

yogeshmpawar’s picture

StatusFileSize
new28.71 KB
new7.51 KB

Updated patch with reroll diff attached.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 24: 3243121-24.patch, failed testing. View results

andregp’s picture

Status: Needs work » Needs review
StatusFileSize
new29.27 KB
new426 bytes

6 of the 7 fails at #24 were unrelated to the patch, although the reroll missed one line of change (which triggered the 7th error).

I'll wait for the HEAD to pass the tests first to then queue tests on this patch.

yogeshmpawar’s picture

StatusFileSize
new29.28 KB
new2.63 KB

Updated patch with reroll diff attached.

rinku jacob 13’s picture

StatusFileSize
new100.68 KB
new91.99 KB

I have applied patch#7 for drupal 9.4.x dev.
Before applying the patch, the RDF module is a part of the installed module. after the patch, the module is part of the disabled(uninstalled) module.
I think as per the requirement of this issue, the RDF module need not be shown in extend list. But After applying the patch also, the RDF module is part of the list of extend. Can anyone suggest to me if it is wrong or not?

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.

catch’s picture

Status: Needs review » Reviewed & tested by the community

@Rinku Jacob 13 the module will still show in the extend list, it just won't be enabled when you install Drupal with the standard profile.

Patch looks great to me, just tidying up various tests that depend on RDF being in the standard profile.

lauriii’s picture

Status: Reviewed & tested by the community » Needs review
+++ /dev/null
@@ -1,520 +0,0 @@
-class StandardProfileTest extends BrowserTestBase {

I think we might be losing some test coverage if we just remove this test. I'm wondering if we should just modify this test to install Standard and then install RDF on top of that, and run the same assertions?

spokje’s picture

I'm wondering if we should just modify this test to install Standard and then install RDF on top of that, and run the same assertions?

I can see your point about maybe loosing test coverage, but we can't change the test to install standard and whack RDF on top until RDF is removed from it first I think.

So maybe this is something for a follow-up issue?

xjm’s picture

Issue tags: -9.4.0 release notes

Did not land in 9.4, so untagging.

spokje’s picture

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

StatusFileSize
new12.45 KB
new22.84 KB

Addressed #31

spokje’s picture

Assigned: spokje » Unassigned
Status: Needs work » Needs review
longwave’s picture

Status: Needs review » Reviewed & tested by the community

#31 was addressed by moving the RDF standard config to a test module, and keeping the test case intact otherwise.

catch’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

Needs a re-roll.

skipper-vp’s picture

Status: Needs work » Needs review
StatusFileSize
new12.45 KB
new309 bytes

Rerolled the patch

spokje’s picture

StatusFileSize
new11.21 KB

Since 10.0.x-dev doesn't have the Aggregator module any more, we need a separate D10 patch.

Status: Needs review » Needs work

The last submitted patch, 40: 3243121-d10-40.patch, failed testing. View results

spokje’s picture

Status: Needs work » Needs review
StatusFileSize
new9.11 KB
new3.74 KB
spokje’s picture

Issue tags: -Needs reroll
catch’s picture

Status: Needs review » Reviewed & tested by the community

#42 looks great - back to RTBC but since it's a straight re-roll I'll pretend it was already RTBC and commit it a bit later unless someone beats me to it.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php
@@ -28,6 +28,7 @@ class Upgrade7Test extends MigrateUpgradeExecuteTestBase {
diff --git a/core/profiles/standard/config/install/rdf.mapping.comment.comment.yml b/core/modules/rdf/tests/rdf_standard_profile_test/config/install/rdf.mapping.comment.comment.yml

diff --git a/core/profiles/standard/config/install/rdf.mapping.comment.comment.yml b/core/modules/rdf/tests/rdf_standard_profile_test/config/install/rdf.mapping.comment.comment.yml
similarity index 100%

similarity index 100%
rename from core/profiles/standard/config/install/rdf.mapping.comment.comment.yml

rename from core/profiles/standard/config/install/rdf.mapping.comment.comment.yml
rename to core/modules/rdf/tests/rdf_standard_profile_test/config/install/rdf.mapping.comment.comment.yml

rename to core/modules/rdf/tests/rdf_standard_profile_test/config/install/rdf.mapping.comment.comment.yml
diff --git a/core/profiles/standard/config/install/rdf.mapping.node.article.yml b/core/modules/rdf/tests/rdf_standard_profile_test/config/install/rdf.mapping.node.article.yml

diff --git a/core/profiles/standard/config/install/rdf.mapping.node.article.yml b/core/modules/rdf/tests/rdf_standard_profile_test/config/install/rdf.mapping.node.article.yml
similarity index 100%

similarity index 100%
rename from core/profiles/standard/config/install/rdf.mapping.node.article.yml

rename from core/profiles/standard/config/install/rdf.mapping.node.article.yml
rename to core/modules/rdf/tests/rdf_standard_profile_test/config/install/rdf.mapping.node.article.yml

rename to core/modules/rdf/tests/rdf_standard_profile_test/config/install/rdf.mapping.node.article.yml
diff --git a/core/profiles/standard/config/install/rdf.mapping.node.page.yml b/core/modules/rdf/tests/rdf_standard_profile_test/config/install/rdf.mapping.node.page.yml

diff --git a/core/profiles/standard/config/install/rdf.mapping.node.page.yml b/core/modules/rdf/tests/rdf_standard_profile_test/config/install/rdf.mapping.node.page.yml
similarity index 100%

similarity index 100%
rename from core/profiles/standard/config/install/rdf.mapping.node.page.yml

rename from core/profiles/standard/config/install/rdf.mapping.node.page.yml
rename to core/modules/rdf/tests/rdf_standard_profile_test/config/install/rdf.mapping.node.page.yml

rename to core/modules/rdf/tests/rdf_standard_profile_test/config/install/rdf.mapping.node.page.yml
diff --git a/core/profiles/standard/config/install/rdf.mapping.taxonomy_term.tags.yml b/core/modules/rdf/tests/rdf_standard_profile_test/config/install/rdf.mapping.taxonomy_term.tags.yml

diff --git a/core/profiles/standard/config/install/rdf.mapping.taxonomy_term.tags.yml b/core/modules/rdf/tests/rdf_standard_profile_test/config/install/rdf.mapping.taxonomy_term.tags.yml
similarity index 100%

similarity index 100%
rename from core/profiles/standard/config/install/rdf.mapping.taxonomy_term.tags.yml

rename from core/profiles/standard/config/install/rdf.mapping.taxonomy_term.tags.yml
rename to core/modules/rdf/tests/rdf_standard_profile_test/config/install/rdf.mapping.taxonomy_term.tags.yml

rename to core/modules/rdf/tests/rdf_standard_profile_test/config/install/rdf.mapping.taxonomy_term.tags.yml
diff --git a/core/modules/rdf/tests/rdf_standard_profile_test/rdf_standard_profile_test.info.yml b/core/modules/rdf/tests/rdf_standard_profile_test/rdf_standard_profile_test.info.yml

diff --git a/core/modules/rdf/tests/rdf_standard_profile_test/rdf_standard_profile_test.info.yml b/core/modules/rdf/tests/rdf_standard_profile_test/rdf_standard_profile_test.info.yml
new file mode 100644

new file mode 100644
index 0000000000..4769b58fba

index 0000000000..4769b58fba
--- /dev/null

--- /dev/null
+++ b/core/modules/rdf/tests/rdf_standard_profile_test/rdf_standard_profile_test.info.yml

+++ b/core/modules/rdf/tests/rdf_standard_profile_test/rdf_standard_profile_test.info.yml
+++ b/core/modules/rdf/tests/rdf_standard_profile_test/rdf_standard_profile_test.info.yml
@@ -0,0 +1,7 @@

@@ -0,0 +1,7 @@
+name: 'RDF standard profile test module'
+type: module
+description: 'Test functionality for the RDF module on top of the standard profile.'
+package: Testing
+version: VERSION
+dependencies:
+  - drupal:rdf

I think we should consider moving the RDF config from standard to the optional folder in the rdf module and adding an enforced dependency on the standard module (yes it is a profile but for config dependencies we'll treat it as a module).

This way if someone installs the rdf module on 9.5.x on top of standard it is the same as doing so on 9.4.x.

I guess there is a slight downside when the module moves to contrib because the maintainers will have to deal with changes to standard / decide whether to continue to support it. But the 10.x supporting version of RDF could always decide to drop the standard requiring config.

This would allow us to remove the rdf_standard_profile_test module and just install RDF on top of standard in core/modules/rdf/tests/src/Functional/StandardProfileTest.php

alexpott’s picture

Status: Needs work » Needs review
StatusFileSize
new4.09 KB
new13.06 KB
new9.72 KB

Here's #45 implemented.

FWIW the contrib module maintainers will have the problem with #42 anyways… because they’ll have to decide what to do with \Drupal\Tests\rdf\Functional\StandardProfileTest and the weird test module…

The benefit of this approach is that there is less change for 9.5.x and the dependency on standard of this config is explicit.

Status: Needs review » Needs work

The last submitted patch, 46: 3243121-d10-46.patch, failed testing. View results

alexpott’s picture

Status: Needs work » Needs review
StatusFileSize
new3.27 KB
new11.12 KB
new7.77 KB

Doh of course... this configuration belongs in standard's optional configuration. Then when we remove RDF from core we remove it from the optional config in standard and we're good to go. Then the Rdf contrib module maintainers can decide what to do with Standard test move it has moved to contrib.

Also as #4 mentioned we need to remove from Umami as well. We should have a separate issue to discuss that.

alexpott’s picture

StatusFileSize
new2.61 KB
new14.54 KB
new11.2 KB

Hmmm actually being able to move the config completely out of standard is nice and keeps all the rdf stuff together... let's fix the tests in #46.

catch’s picture

Status: Needs review » Reviewed & tested by the community

I wasn't sure about moving the config to standard, but it means no change in the behaviour when you install standard + RDF (until RDF is actually removed from core in 10.x) and looks pretty clean to me.

The last submitted patch, 49: 3243121-d9-49.patch, failed testing. View results

larowlan’s picture

Just got one question about whether we should loosen the dependency to make RDF do something for some fraction of sites if it gets installed after the initial profile install. And a comment about scope that I don't think should hold things up here, even though technically our scope rules say it should.

  1. +++ b/core/modules/rdf/config/optional/rdf.mapping.node.page.yml
    @@ -5,6 +5,9 @@ dependencies:
    +  enforced:
    +    module:
    +      - standard
    
    +++ b/core/modules/rdf/config/optional/rdf.mapping.taxonomy_term.tags.yml
    @@ -5,6 +5,9 @@ dependencies:
    +  enforced:
    +    module:
    +      - standard
    

    But does this really rely on standard profile or does it actually just rely on the existing dependencies, e.g. the page node type.

    E.g. if you have a site not based off standard, and you have a page node-type and then you decide to install RDF, shouldn't this config be installed?

    Similarly for the vocabularies.

    Or are we taking too much liberty there and placing too much emphasis on the happy collision of a node-type machine-name?

    The issue is that without this config, installing RDF does nothing. You'd install it and go, what did that do. And then go looking in the UI and find nothing. And as there's no UI to add a config so you would have to know to go looking for RDF UI module - https://www.drupal.org/project/rdfui. I am happy if the answer is yep, nothing 🤷 but figured I should ask

    Side note, I think the number of sites reporting usage of that module is probably a more reasonable estimate of the number of sites using RDF, plus/minus a handful who hand edited the YML.

  2. +++ b/core/modules/rdf/tests/src/Functional/StandardProfileTest.php
    @@ -36,80 +36,118 @@ class StandardProfileTest extends BrowserTestBase {
    +   * The URI of the image to test.
    +   *
    ...
    +   * The URI of the term to test.
    +   *
    

    Are all these comment changes in scope? Technically no, but is it worth holding this issue up for, I don't think so.

  3. +++ b/core/modules/rdf/tests/src/Functional/StandardProfileTest.php
    @@ -161,7 +199,10 @@ protected function setUp(): void {
    -    $this->drupalCreateNode(['type' => 'article', 'promote' => NodeInterface::PROMOTED]);
    +    $this->drupalCreateNode([
    +      'type' => 'article',
    +      'promote' => NodeInterface::PROMOTED,
    +    ]);
    

    Same comment here re scope

longwave’s picture

E.g. if you have a site not based off standard, and you have a page node-type and then you decide to install RDF, shouldn't this config be installed?

This is no different from the existing behaviour though? If you set up a site on minimal and then install RDF module, you don't get any mappings. IMO this is a feature request for the RDF module in contrib, and in fact it probably makes sense for rdf and rdfui to be combined in contrib, if anyone cares to do so.

catch’s picture

Yeah I think #52 would have been a very good idea when we added RDF to core, but less so now when we're trying to remove it.

Side note, I think the number of sites reporting usage of that module is probably a more reasonable estimate of the number of sites using RDF, plus/minus a handful who hand edited the YML.

/me looks at the usage stats 0.o

larowlan’s picture

This is no different from the existing behaviour though? If you set up a site on minimal and then install RDF module, you don't get any mappings. IMO this is a feature request for the RDF module in contrib, and in fact it probably makes sense for rdf and rdfui to be combined in contrib, if anyone cares to do so.

Makes sense, lets move this forward

Saving issue credits
Crediting catch for 4 or 5 reviews and comms in slack
Crediting quietone for meta-issue and related issue wrangling
Crediting andypost for reviews and review of the change-notice and release note
Crediting lauriii for a review

  • larowlan committed 7cb838f on 10.0.x
    Issue #3243121 by Spokje, alexpott, longwave, yogeshmpawar, skipper-vp,...
  • larowlan committed 4134143 on 10.1.x
    Issue #3243121 by Spokje, alexpott, longwave, yogeshmpawar, skipper-vp,...

  • larowlan committed bc5c386 on 9.5.x
    Issue #3243121 by Spokje, alexpott, longwave, yogeshmpawar, skipper-vp,...
larowlan’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 10.1.x and backported to 10.0.x

Committed the 9.x patch to 9.5.x

Published the change record - great work here folks

Status: Fixed » Closed (fixed)

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