Problem/Motivation
The migration documentation includes a page,
Migrating to Drupal 8 from a previous version, that just redirects to another migration documentation page. The page is only needed because the node number is hard coded in core.
'description' => 'Your system schema version is ' . $system_schema . '. Updating directly from a schema version prior to 8000 is not supported. You must <a href="https://www.drupal.org/node/2179269">migrate your site to Drupal 8</a> first.',
Proposed resolution
1. Replace the hard coded node number in core with a link to Upgrade to Drupal 8.
2. Make a documentation issue to have /node/2179269 hidden from the documentation guide navigation as per the existing text on the page.
The latest screenshot, from #17
Remaining tasks
Documentation issue has been created, see #2914984: Hide node/2179269 from 'Upgrade to Drupal 8' guide
Review the patch.
Commit
User interface changes
Yes
API changes
N/A
Data model changes
N/A
Comment | File | Size | Author |
---|---|---|---|
#18 | Selection_001.png | 11.25 KB | quietone |
#17 | interdiff-2914292-14-17.txt | 889 bytes | masipila |
#17 | 2914292-17.patch | 887 bytes | masipila |
#14 | 2914292-4.patch | 896 bytes | quietone |
#11 | interdiff.txt | 822 bytes | quietone |
Comments
Comment #2
quietone CreditAttribution: quietone as a volunteer commentedComment #3
masipila CreditAttribution: masipila as a volunteer commentedI'll write a patch this evening for this.
Comment #4
masipila CreditAttribution: masipila as a volunteer commentedHere's the simple patch to change the URL in core/includes/update.inc to the correct landing page for the 'Upgrade to Drupal 8' guide.
What comes to removing the old page https://www.drupal.org/node/2179269: I don't think it's necessary to delete that node, we can simply hide it from the guide navigation. That can actually be done already before this patch lands. I'll create a d.o. documentation issue for that.
Cheers,
Markus
Comment #5
masipila CreditAttribution: masipila as a volunteer commentedComment #6
masipila CreditAttribution: masipila as a volunteer commentedComment #7
quietone CreditAttribution: quietone as a volunteer commentedTested this by forcing the schema_version to be 1000. Attached is attached a before and after screenshot. The link has been changed and looks correct. However, in both the href tag is displayed and not the a clickable link. Back to NW for that.
Before:
After:
Comment #8
masipila CreditAttribution: masipila as a volunteer commentedThe documentation part has been done and the remaining thing is to fix the link in core.
I removed the parent meta issue from this so that I can close the parent meta about reorganizing the doc guides as that has been now completed.
Cheers,
Markus
Comment #9
quietone CreditAttribution: quietone as a volunteer commentedHow about wrap the text in the t function.
Comment #10
masipila CreditAttribution: masipila as a volunteer commentedThe latest patch is still pointing to the old URL i.e. https://www.drupal.org/node/2179269
That URL is now working because I asked the d.o. team to redirect from there to the current URL https://www.drupal.org/docs/8/upgrade which is technically
https://www.drupal.org/node/2786407
So now that we're fixing the t() issue, let's also point the link directly to the correct URL i.e either https://www.drupal.org/docs/8/upgrade or
https://www.drupal.org/node/2786407
Markus
Comment #11
quietone CreditAttribution: quietone as a volunteer commented@masipila, thanks. Here is another try.
Comment #12
masipila CreditAttribution: masipila as a volunteer commentedThis looks good to me, RTBC. I guess we need another reviewer though as I was contributing to the patch earlier.
Markus
Comment #13
xjmSo, adding a
t()
here is out of scope for correcting a URL in a string.I also suspect these requirements don't have
t()
on purpose because they might have been used in early bootstrap whent()
was not available.The specific lines were added in #2168011: Remove all 7.x to 8.x update hooks and disallow updates from the previous major version, but they were based on lines moved from
update_prepare_d8_bootstrap()
, which in turn was based onupdate_prepare_d7_bootstrap()
. Before that, they were originally added in #864464: Upgrade path broken if not run from at least Drupal 6.16 like seven years ago. And those lines were added alongside existing untranslated strings dating back to #233091: Move code from update.php into includes/update.inc. And so on. Basically, these have been untranslated as long as update.php has been around.It could be that we can translate these strings now after all the refactoring that's happened in Drupal 8, but if so, we should discuss that in a dedicated issue and add
t()
in all the places that they're missing in early update requirements, rather than just adding one offhand here. So tagging "Needs followup" to file such an issue.Meanwhile, let's remove the added
t()
from this patch to keep the issue within a single scope. (Reference: https://www.drupal.org/core/scope#creep)Thanks for working on this!
Comment #14
quietone CreditAttribution: quietone as a volunteer commented@xjm, thanks for the background.
Removing the t() function means we can use the patch in #4. So, re uploading patch 4 here to help the reviewers.
Added the followup, #2918657: add t() in all early update requirements
Comment #15
neerajsinghI agree to @xjm, here neither l() nor t() functions can be used, as they might be called in early bootstrap.
Patch at #14, looks good to me.
Comment #16
masipila CreditAttribution: masipila as a volunteer commentedIf we're not able to produce hyperlinks in the error (see #7), let's then change the message so that we don't have any html in it. Instead, let's change the wording so that it will say like this at the end:
You must migrate your site to Drupal 8 first, see https://www.drupal.org/docs/8/upgrade.
I'll do this today.
Also removing the 'Needs followup' tag as @quietone created the follow-up in #14.
Markus
Edit: clarification on the follow-up tag.
Comment #17
masipila CreditAttribution: masipila as a volunteer commentedHere we go.
Comment #18
quietone CreditAttribution: quietone as a volunteer commentedGood idea to remove the tags and show something more friendly to the user. I think this is within scope and we have the followup.
Comment #19
quietone CreditAttribution: quietone as a volunteer commentedComment #20
larowlanAdding @xjm for review
Comment #23
larowlanCommitted as 37d0cad and pushed to 8.5.x
Cherry-picked as 8d2de8f and pushed to 8.4.x