Since .info.yml contain "version: VERSION", such VERSION will be replaced by corresponding Drupal core version number. Therefore if install with git checkout, Available Update page will report that coming with an unsupported or incorrect version number.
Documentation for Drupal 7.x (https://www.drupal.org/node/542202#version):
version (Discouraged)
The version string will be added by drupal.org when a release is created and a tarball packaged. However, if your module is not being hosted on the drupal.org infrastructure, you can give your module whatever version string makes sense (eg. see Release naming conventions).
Documentation for Drupal 8.x (https://www.drupal.org/node/2000204#s-complete-example):
- Restricted properties, added by Drupal packaging system. Do not add these manually to info.yml in your repository.
version
project
Comment | File | Size | Author |
---|---|---|---|
#5 | blazy-remove_version_from_info_yml-2890216-5.patch | 315 bytes | hswong3i |
#3 | AfterPatch_Blazy.png | 44.99 KB | Aanal.addweb |
#3 | BeforePatch_Blazy.png | 46.36 KB | Aanal.addweb |
Comments
Comment #2
hswong3i CreditAttribution: hswong3i commentedComment #3
Aanal.addweb CreditAttribution: Aanal.addweb at AddWeb Solution Pvt. Ltd. commented@hswong3i, Thanks for adding patch for Drupal 8 I've checked your patch by manually & with Simplytest.me, by both the ways it works well for me. PFA as a result of after patch.
Comment #4
gausarts CreditAttribution: gausarts commentedThank you for contribution.
Let's mark anything Recommended and Discouraged as Task.
Bug is when things or functionality breaks, such as misspelling for docs, or broken codes, etc.
I have replied to this type of issue here:
#2773159: Remove version from slick.info.yml file.
Discouraged is not a definitive "no".
Comment #5
hswong3i CreditAttribution: hswong3i commentedTwo years later... Issue still happening for me, patch update for 8.x-2.x-dev.
Comment #6
hswong3i CreditAttribution: hswong3i commentedComment #8
gausarts CreditAttribution: gausarts commentedThis comes up several times. Allow me to make it clear.
Standards are guidelines I agree we value and must follow to some extent.
You don't have errors by breaking standards, you do have warnings. Warnings are not errors! That is why it not a bug.
Worst, unfortunately they are sometimes so generic that they missed a few details and problems that we encounter in everyday life.
Like you missed the information line that I deliberately put in there before the version line.
1. Please read the linked thread, especially my comment:
https://www.drupal.org/project/slick/issues/2773159#comment-11524039
2. Please read the added comment line:
If you don't understand:
1. Install Blazy + Slick related modules. Act like a patcher. Do a git checkout with drush combo.
2. Visit /admin/modules. See the problem there? If you don't, try seeing it better.
3. Now install other Blazy related modules which depends on Slick, such ElevateZoom Plus, etc. Repeat 2. And read again the from above. If you still don't see no evil, then stop patching you don't understand.
Comment #9
hswong3i CreditAttribution: hswong3i commented@gausarts sorry that your "add a fake version" tricks may not really works, e.g.
Manage installation with
composer.json
as below:Therefore the generated
*.info.yml
becomes:BTW, from
admin/reports/updates
will shown as:Which means your hack brake the Available Update page and so showing the incorrect version number.
Shall we follow the official documentation for Drupal 8.x (https://www.drupal.org/node/2000204#s-complete-example) as below?
Comment #10
gausarts CreditAttribution: gausarts commented@hswong3i, I appreciate your persistence. And I am okay, too.
I would be happy to remove the hack line, of course, once I don't see my own problem as outlined at #8. Until then, it is needed to be there at least for me as a maintainer.
However let's break it down again based on your own problem now.
With your new info, we now have two angles/ viewpoints/ perspectives:
Unfortunately, at least from your own comment #9, you don't use regular
Drupal.org packaging script
(yours isdrustack/composer-generate-metadata
) which tricks you to think you were having end users problem.Try using regular
Drupal.org packaging script
, and see.For end users,
Drupal.org packaging script
will comment the hack line automatically, so it goes like this:So you don't have no issues at
admin/reports/updates
. The report will show you the correct end users version. Hence in my case like this:Note the commented line:
# version: 8.x-2.x
. The commented line will not be read byadmin/reports/updates
.But you showed me the non-commented line:
version: 8.x-2.x
here:which immediately shows that
drustack/composer-generate-metadata
doesn't do the same thing asDrupal.org packaging script
. It is then yourdrustack
issue. Please report the issue todrustack
instead.Let me know if we still need more clarification on this regard.
Since you created similar issues at many of my projects, I would appreciate if you change them to Task, not Bug as I said in #8, for the first step. Once you are being clear on this issue right here, I would appreciate, if you close them all as Duplicate. Thank you!
Comment #11
gausarts CreditAttribution: gausarts commentedFeel free to open if anything. Thanks!