API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21...

This page, which documents the D8 Render API, contains links to D7 pages on Drupal.org. There is already an @todo in the documentation to fix this.

The links in question are:

- https://www.drupal.org/node/930760 - Drupal 7: Render Arrays overview, which is superseded in this case by https://www.drupal.org/docs/8/api/render-api/render-arrays. The docs here already link to https://www.drupal.org/docs/8/api/render-api, so this can probably just be removed
- https://www.drupal.org/node/933976, and https://www.drupal.org/node/722174 - Using the theme layer (Drupal 7.x) should be replaced with a link to https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21...

Making the final list:

- https://www.drupal.org/developing/api/8/render
- https://www.drupal.org/docs/8/theming
- @link themable Theme system overview @endlink

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

eojthebrave created an issue. See original summary.

cilefen’s picture

cilefen’s picture

brentg’s picture

Created a patch with the changes from eojthebrave

brentg’s picture

Status: Active » Needs review
eojthebrave’s picture

Status: Needs review » Needs work

Thanks @brentgees, this needs a little work still though. This link:

+++ b/core/lib/Drupal/Core/Render/theme.api.php
@@ -225,12 +225,7 @@
+ * - https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21theme.api.php/group/themeable/8.3.x

Should use the @link docblock syntax instead. And in the comment you can just put @link themeable Theme system overview @endlink. api.drupal.org will automatically convert that to a link to the topic page as needed. This ensures amongst other things that those links link to the version specific topic page. 8.3.x vs 8.2.x for example.

pritish.kumar’s picture

Please check, if the changes made are correct.

pritish.kumar’s picture

Status: Needs work » Needs review
pankajsachdeva’s picture

Hi pritish.kumar,

I have applied this patch and its applied successfully. I am attaching the screenshot of it.

pankajsachdeva’s picture

Status: Needs review » Reviewed & tested by the community
Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/lib/Drupal/Core/Render/theme.api.php
@@ -225,12 +225,7 @@
+ * @link themeable Theme system overview @endlink. api.drupal.org ¶

Let's not add line ending whitespace.

pankajsachdeva’s picture

Assigned: Unassigned » pankajsachdeva
pankajsachdeva’s picture

Hi Gábor,

I removed line ending whitespace.

pankajsachdeva’s picture

Assigned: pankajsachdeva » Unassigned
Status: Needs work » Needs review
eojthebrave’s picture

Status: Needs review » Needs work
+++ b/core/lib/Drupal/Core/Render/theme.api.php
@@ -225,12 +225,7 @@
+ * @link themeable Theme system overview @endlink. api.drupal.org

We can remove the "api.drupal.org" string from the end of this line. Sorry, that might have been confusing in my earlier comment, but it's not necessary here.

pankajsachdeva’s picture

Assigned: Unassigned » pankajsachdeva
pankajsachdeva’s picture

Hi eojthebrave,

I have updated the patch as mentioned in the above comment.

pankajsachdeva’s picture

Status: Needs work » Needs review
eojthebrave’s picture

Status: Needs review » Needs work
+++ b/core/lib/Drupal/Core/Render/theme.api.php
@@ -225,12 +225,7 @@
+ * @link themeable Theme system overview @endlink.

This line needs a leading "- " to make it part of the list along with the other two links. So the full line should read "* - @link themeable Theme system overview @endlink.". Once that's been added I think this is probably good to go. Thanks.

pritish.kumar’s picture

Status: Needs work » Needs review
FileSize
793 bytes
589 bytes

Applied as stated in #19

eojthebrave’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

pankajsachdeva’s picture

Assigned: pankajsachdeva » Unassigned
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 84233ba to 8.4.x and b913e86 to 8.3.x. Thanks!

  • alexpott committed 84233ba on 8.4.x
    Issue #2875443 by pankajsachdeva, pritish.kumar, brentgees: Remove D7...

  • alexpott committed b913e86 on 8.3.x
    Issue #2875443 by pankajsachdeva, pritish.kumar, brentgees: Remove D7...

Status: Fixed » Closed (fixed)

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

rajeevku’s picture

Its time we add correct links to this instead of just removing D7 URL's.

eojthebrave’s picture

I believe that by linking to https://www.drupal.org/docs/8/api/render-api, and https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21... we are linking to all the current documentation. There are fewer links than before, but https://www.drupal.org/docs/8/api/render-api is really more of a landing page with a bunch of content underneath it.

If you've got suggestions for other things we could add here to help make this even better though could you maybe provide either a list of links, or suggestions on what you feel is missing? Thanks.