Hi,
I just downloaded metatag 7.21 to update to the latest version. After I copied the code to my web server and tried to run update.php I see a lot of dependency errors. Unless the syntax has changed, I assume that this might have been an accidental back port issue.
Package included metatag.info with:
; This requires Drupal 7.28 or newer as it fixes the [node:summary] token that
; was previously broken.
dependencies[] = drupal:system (>= 7.28)
; CTools is required.
dependencies[] = ctools:ctools
; Requires Token; v7.x-1.6 is highly recommended due to bugs with certain tags
; when using older versions.
dependencies[] = token:token
Should it not be:
; This requires Drupal 7.28 or newer as it fixes the [node:summary] token that
; was previously broken.
dependencies[] = system (>= 7.28)
; CTools is required.
dependencies[] = ctools
; Requires Token; v7.x-1.6 is highly recommended due to bugs with certain tags
; when using older versions.
dependencies[] = token
Comments
Comment #2
jelo commentedSame applies to all sub modules...
Comment #3
damienmckennaWhich ones show as problems? The "project:module" syntax for dependencies has been around for a few years. What version of Drupal are you using?
Comment #4
jelo commentedI am using 7.39. All dependencies are braking the update script that only shows missing dependencies. As soon as I change the declaration of the dependencies everything works...
Comment #5
damienmckennaThe module's dependencies were changed in #2844504: Testbot failing for Metatag-D7 =) and Drupal core was updated to support this structure in 7.40 which was released in October 2015. So yeah, you need to update your core release.
Remember that when you run into a problem with a module you should always make sure your system is up to date across the board.
This patch updates the requirements to specifically note 7.40 is required.
Comment #7
damienmckennaComment #8
damienmckennaFYI I updated the 7.21 release notes to point this out: https://www.drupal.org/project/metatag/releases/7.x-1.21
Comment #9
damienmckennaCommitted.
Apologies for the mixup, I should have noted in the release notes and updated the module's requirements.
Comment #10
jelo commentedNo worries. My prod site is on the latest 7 release. However, the dev site that I used to test metatag on was on an earlier version and I did not realize that this changed in 7.40, especially because it mentioned 7.28 only as requirement. Glad to see that it is noted now in the release notes. Appreciate your quick attention!
Comment #11
Asacolips commentedI'm installing a new site with Metatag as a dependency, and whenever I use 7.x-1.21 I receive the following error on the Verify requirements step, and am unable to proceed without dropping Metatag down to 7.x-1.20 or lower. For my install, I'm using a custom installation profile based on the Panopoly distribution, and have the profile configured to use the latest non-dev release of Drupal 7 rather than a specific version.
I can see from the other comments that this is a new syntax starting from 7.40 and up, but does that work with installation profiles? If not, should this issue be re-opened, or should it be handled as a core issue?
Comment #12
damienmckennaYeah, I can reproduce this with the following change to panopoly:
Comment #13
damienmckennaI opened a core issue: #2855026: Installation profiles do not support project:module format for dependencies
Comment #14
damienmckennaMarking this postponed until the core issue is fixed.
Comment #15
damienmckennaI've worked out a fix in #2855026: Installation profiles do not support project:module format for dependencies, now to work with the core team to make it commit-worthy.
Comment #16
damienmckennaComment #17
torotil commentedI can’t reproduce the issue as described with Drupal 7.56. According to my tests in #2905520: Installation profiles do not support project:module format for dependencies (backport to D7) it seems that the profile.info is not allowed to have project:module dependencies or versioned dependencies, but depending on a module that has such dependencies is not an issue.
Comment #18
torotil commentedHa, when I download panopoly like mentioned above I can reproduce this issue. I just can’t reproduce it with any other installation profile. So this seems to be something specific for panopoly. Perhaps they somehow "inline" the nested dependencies?
Comment #19
torotil commentedOk, the problem lies in
panopoly_core_install_load_profile(). It indeed inlines all the module dependencies and does it without support for project:module format dependencies.This is not an issue with metatag.
Comment #20
torotil commentedComment #21
torotil commentedComment #22
damienmckennaMoved back to the Metatag issue queue as this is a problem with Metatag that unearthed a bug in core; feel free to open a new issue in the Panopoly issue queue if you need, but please don't hijack this one.
Comment #23
torotil commented@Damien Please read the evidence before you draw conclusions.
panopoly_core_install_load_profile()from panopoly the installation works fine.I’m not saying core doesn’t have an issue (namely that installation profiles can’t have complex dependencies directly) but what caused the error in this bug report and what hinders metatag from using new-style dependencies is not a bug in core but a bug in panopoly.
Edit: And yes perhaps fixing the core limitation would fix the panopoly bug too … but until then panopoly should take care of core’s limitations and do the same thing that it already does for versioned dependencies: cut them out before injecting them into the profile installation process.
Here is the copy of the function so you can see yourself:
Comment #24
damienmckenna@torotil: Please open a new issue and cross-reference it, and do not hijack issues.
Comment #25
torotil commentedYeah that’s a matter of interpretation and I see you have another interpretation than I. I just spent a few hours tracking this down. ;-)
Never mind. I don’t use Panopoly and I don’t need this bug fixed. Good luck!
Comment #26
damienmckenna@torotil: My sincerest apologies, I was in a hurry earlier and didn't think Panopoly had anything to do with it as I'd forgotten that my own testing was based on Panopoly.
I've reviewed the code you reference and yes, the problem is in Panopoly after all.
Moving this back to the Panopoly issue queue and attaching a patch which may resolve the problem.
Again, I am sorry for my response.
Comment #27
torotil commented@damien Np. Great to hear that we seem to be on the same side now.
Is there a reason why you avoid using
drupal_parse_dependency()in your patch?Comment #28
damienmckennaI forgot it was there? :)
Comment #29
torotil commentedHere is a new patch using
drupal_parse_dependency().The patch still doesn’t allow complex dependencies in the installation profile itself on purpose: The most promising patch for allowing complex dependencies in install profiles would make this whole function obsolete.
Comment #30
dsnopekThanks, @torotil & @DamienMcKenna!
Trying the tests on Travis with the patch:
https://travis-ci.org/panopoly/panopoly/builds/337598643
Comment #31
z.stolar commentedHi all, just reporting that the patch at #29 solved the problem in my case.
Comment #32
dsnopekI haven't tested this, but the patch looks good to me. Marking as RTBC so it doesn't get lost :-)
Comment #34
dsnopekCommitted! Thanks, Everyone!