Problem/Motivation
This is a followup from #2481103: "Undefined index" errors in system.install loading admin/reports/system.
If you install a profile without the "version" key and move into admin/reports/status page, you will see an empty dash.
Steps to reproduce
- Install a new instance of drupal using the "minimal" profile
- Inside
core/profiles/minimal/minimal.info.ymlfile, remove the "version" key - Go to
admin/reports/statuspage and check the Installation profile section
Proposed resolution
Following the idea of #12, if a profile does not have a VERSION, the dash will be ommited.
Remaining tasks
PatchTestReview- Commit
User interface changes
Before:
Minimal (minimal-)

After:
Minimal (minimal)

API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #56 | 3270892-drupal-11.2.2.patch | 1.17 KB | rodrigoaguilera |
Issue fork drupal-3270892
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:
- 3270892-d11
changes, plain diff MR !9738
- 3270892-if-you-dont
changes, plain diff MR !2003
Comments
Comment #2
murilohp commentedComment #3
murilohp commentedComment #4
murilohp commentedComment #5
murilohp commentedComment #6
murilohp commentedThis is issue was a result of the bugsmash initiave, specially the work done on #2481103: "Undefined index" errors in system.install loading admin/reports/system so adding the tag and the related issue here.
Comment #9
larisse commentedHi! I follow the steps to reproduce the error and was able to reproduce. With the Proposed Resolution, the error was fixed and even if the "version" key is not set in
mininal.info.ymlfile, the page will not empty. So I opened a merge request to fix it.Comment #11
joachim commentedI'm not sure this is the right fix.
Any profile you download from d.org will have the version filled in, won't it?
So the profiles that don't have this will be custom in-house install profiles that are used to install multiple sites. In that situation, using Drupal's core version number doesn't make sense to me.
I think it might be better to show 'Undefined'.
Comment #12
avpadernoIt doesn't make sense for me too. It would mean that the same profile, installed for different Drupal versions, would show a different version.
IMO, it doesn't make sense to show, for example, Minimal (minimal-9.3-12-dev) nor Minimal (minimal-undefined). I would just show the profile name and the version, when it has been set (Minimal (9.3-12-dev) or Minimal). At least, it would be consistent with the versions shown for modules, which aren't prefixed by the module machine name. (It doesn't show node-9.3.18-dev, for the Node module.)
Comment #13
murilohp commentedThanks for applying the suggestion @larisse, and also thanks @yogeshmpawar for the rebase!
Regarding #11 and #12:
At the first moment I thought your suggestion a good one @joachim, but after reading the comment from @apaderno(#12), I got to say that I agree with him, I think it's better to keep things consistent, it means, if the profile does not have a version it will show just the profile name and machine name, something like:
Before:
Minimal (minimal-)
After:
Minimal (minimal)
I've update the PR with this logic and I've added a new test to validate this scenario. It would be nice to have your thoughts here, since it's a bug I've upload a TEST-ONLY patch, so it's supposed to fail here.
Moving back to NR.
Comment #14
murilohp commentedComment #15
murilohp commentedComment #16
murilohp commentedComment #18
murilohp commentedMoving back to NR, the failing test seems unrelated.
Comment #19
hmendes commentedApplied the MR and it fixed the problem following the Proposed resolution.
Changing this to RTBC.
Following a screenshot with the changes applied.
Comment #20
avpadernoThe patch in #13, which was supposed to fail, failed because Your XML configuration validates against a deprecated schema. which isn't the expected failure.
Comment #21
murilohp commentedHey @apaderno, I think the "Your XML configuration validates against a deprecated schema" is a warning message and AFAIK every time a patch fails, this message is displayed, the error is actually:
Comment #22
avpadernoI was referring to this sentence in that comment.
I take you are expecting that patch fails, but I take you aren't talking about the Your XML configuration validates against a deprecated schema. failure. What failure should that test patch show, then?
Comment #23
murilohp commentedMy bad @apaderno, the patch should actually fail the new test that was added to validate the "empty dash", the
core/tests/Drupal/FunctionalTests/Installer/InstallerMissingVersionTest.phpfileComment #24
murilohp commented@hmendes, it's good to know that you've tested the MR, could you update the summary and add the Before and After screenshots?
Comment #25
hmendes commentedSure
Comment #26
avpadernoComment #28
bkosborne@alexverb - Can you create an MR with your change in this issue? I agree just using a string output here makes sense.
Comment #30
ameymudras commentedComment #31
avpaderno$profile_valueis set but never used. That's whycore/scripts/dev/commit-code-check.sh --drupalcifails.Comment #33
ravi.shankar commentedI don't think if we need
$profile_valuevariable anymore so I've removed it. Please review.Comment #34
murilohp commentedJust a minor nitpick, moving back to NW
Comment #36
aarti zikre commentedAddressed #34 concern
Please review this
Comment #37
claudiu.cristeaIn PHP 8.1 this shows an error, at least when running
./vendor/bin/drush core:requirements:Comment #38
claudiu.cristeaI've left a short review in the MR that needs some work
Comment #39
ravi.shankar commentedTried to address #38, changing status to needs review.
Comment #40
murilohp commentedThe tests are failing, maybe because of the change on the
testing_install_profile_missing_version.info.ymlfile, I've also added a new comment. Moving back to NWComment #43
claudiu.cristeaWe are so close, I still have 2 comments in the MR. Also, @larisse, could you, please, change the base branch of the MR to `11.x`? Thanks
Comment #45
shalini_jha commentedI've updated the existing (MR) with the changes suggested #43. However, I don't have the necessary permissions to edit this MR and change the branch to 11.x. Would it be okay if I create a new MR against the 11.x branch?
Comment #46
claudiu.cristeaPlease try to find @larisse and ask her to change. If you don't have a reply in a reasonable amount of time, yes, create a new MR
Comment #47
cyberwolf commentedI removed the unused FormattableMarkup import again.
Comment #50
murilohp commentedI wasn't able to get in touch with the person who opened the first MR, so I've created a new branch and pointed to D11. Moving back to NR to see what you guys think.
Comment #51
murilohp commentedSome tests were failing yesterday, nothing related to the code, but right now it's all green
Comment #52
smustgrave commentedLeft a comment around the test.
Comment #53
murilohp commentedJust answered the MR comment, moving back to NR
Comment #54
smustgrave commentedTo move test, rest seems good to me.
Comment #56
rodrigoaguileraRebased the branch and moved the tests. Not sure why tests are failing.
Attached also you can fin the patch for Drupal 11.2.2 for composer
Comment #57
mstrelan commentedPretty sure this was fixed in #3511868: A profile without a version causes a fatal error on status report page, can anyone confirm? If that's the case a core maintainer can assigned credit and we can close as a duplicate.
Comment #58
rodrigoaguileraYes, totally a duplicate. Adding it as related issue.
I think RTBC might get more attention from a core maintainer to assign credit
Comment #59
catchThanks for figuring out this was a duplicate. Did my best with issue credit and closing out.