Example: When installing the module "pathauto-6.x-1.x-dev", I see in Administer > Site Building > Module:
"This version is incompatible with the 6.0 version of Drupal core."
However, the module itself is compatible. The pathauto.info has:
; Information added by drupal.org packaging script on 2008-02-20
version = "6.x-1.x-dev"
core = "6.x"
project = "pathauto"
datestamp = "1203466182"
The problem is somewhere else. pathauto requires the module "token", and that was the one that was old (from v.5) ( and there, for "Token", the message "This version is incompatible..." is in order].
The problem is that Drupal does not list requirements in this situation.
[The requirement will show only if you remove the Token module from the modules directory.]
The expected behavior should be that "pathauto" should NOT be flagged as incompatible. It should just list the dependencies as usual: "...Depends on: Token (disabled)...",
and when you go to enable "token", you see that it is not compatible.
Or alternatively have the message: "...Depends on: Locale (incompatible)..."
The original problem was discussed in #222415: "This version is incompatible with the 6.0 version of Drupal core" for Pathauto
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | dependencies.patch | 2.63 KB | starbow |
| #12 | 224643_dependencies_2.patch | 2.71 KB | dww |
| #9 | dependencies.patch | 2.63 KB | starbow |
| #6 | dependencies.patch | 2.51 KB | starbow |
Comments
Comment #1
starbow commentedI am also seeing this for XMLSitemap and Event. The main module is shown correctly, but the dependent modules all have the "This version is incompatible with the 6.0 version of Drupal core." error message.
I recreated this with a super-simple example. In an existing Drupal 6 module (call it "foo"), I created a directory ("bar") and added an empty bar.module and and bar.info with the following contents:
; $Id$
name = Bar
description = test
core = "6.x"
No problem. Then I added this line to the bar.info:
dependencies = foo
this triggered the problem. So there is a critical error in the Drupal 6 module dependency system. Note that checking the box to enable foo does not make the error message on bar go away.
Comment #2
Anonymous (not verified) commentedI'm thinking that it would be better to not include the modules in the module list that do not match the Drupal major version. This would cause the proper errors to ensued from Pathauto. Status messages could be displayed on the status page that shows outdated modules to advise the user.
Comment #3
drdrup commentedWell, if no modules of ver 5.x were in the modules directory of ver 6.x, the problem would not show up, as you indicated, and will avoid the problem that I encountered. Yet, admin.module logical behavior is not as it should be when those ver 5.x modules do exist there.
At the moment, the workaround that you described is indeed what I did, until the problem will be resolved.
Comment #4
drdrup commentedstarbow: I don't know if what you describe is the same problem or not, but it is an important one nevertheless.
I am not familiar enough in the programming side.
Did Drupal 6.x changed the syntax from "dependencied = ..." to "dependencies[] = ..." and would not accept the first one anymore?
I had a problem that looks similar, in the module "event", that has two associated modules in its "contrib" subfolder which are flagged as incompatible with 6.x while the "event" itself is OK.
modules/event/contrib/event_all_day/event_all_day.info
modules/event/contrib/event_views/event_views.info
They seems to be for 6.x, but they had a line: "dependencies = ..."
When I edited to "dependencies[] = ..." they all of a sudden became OK.
[I wonder how other people were able to use it at all]
Anyhow, I think that the original problem that I described may results from a different reason.
Comment #5
starbow commented@drdrup: /me slaps head. You are exactly right. It's an unhelpful error message, but not a critical bug. Don't mind me, I will just wander over to the Event and XMLSitemap issue queues and see if these have been patched yet.
Comment #6
starbow commentedHmm, digging a little deeper, it looks like both issues are related. In system.admin.inc:_system_is_incompatible someone decided that if "dependencies" is a string in the .info file, or if any of a module's dependencies are incompatible, then that module is incompatible. Fair enough, but only having a single error message to cover all those cases is a mistake. "This version is incompatible with the 6.0 version of Drupal core." is the wrong message to show in two of the three cases that it is shown.
Here is a patch with more helpful error messages.
Comment #7
drdrup commentedWow! Your patch works like magic !!
The messages are MUCH better now!
I've tested it by removing the [ ] (that I've added) in "modules/event/contrib/event_views/event_views.info", and got a meaningful message: "Dependencies need to be in array format".
I didn't try the other scenarios. Didn't want to mess up my site too much. But I'm sure I'll encounter it when I add other modules.
I wish I could speak PHP'ish.
THANKS!
Comment #8
gábor hojtsy- The patch changes some indents.
- Please include the incompatible module name in the string with "%module", so that the translators are aware of that there is some information there.
Comment #9
starbow commented@Gabor: This should address those issues.
Comment #10
starbow commentedComment #11
dwwt('This module depends on <em>%module</em> ...Those
<em>tags are unnecessary, since % == theme('placeholder') == wrapped in<em>for you.CVS annotate points to #190729: E_ALL - Module admin page - .info file compatibility check and #168487: Disable Modules that depend on incompatible modules for the origins of this bug.
Comment #12
dwwLike so.
Comment #13
starbow commented@dww, thanks for the tip. I guess I should review what those magic characters mean.
BTW, you missed a ">" in your edit.
Comment #14
dwwHehe, whoops, thanks. ;) Yeah, those t() placeholders are crucial to understand, since they have XSS/security implications.
Comment #15
dave reidThis would be baby sitting broken code, so no. Plus we're way past the string freeze for 6. :)
Comment #16
juanlacueva commentedThis should be Drupal's default behavior upon an incompatible requirement, Why isn't this pushed into the drupal core?