Closed (won't fix)
Project:
Localizer
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
15 Apr 2007 at 10:12 UTC
Updated:
31 Oct 2010 at 23:03 UTC
It looks like very confusing for users to have the three items in modules section...
Taxonomy
Taxonomy (Localizer)
Taxonomy (Localizer/ Category)
What will happen if i activate all? Why are the modules not merged together into a single "Taxonomy" that overwrites the Core module like "Menu" module?
Comments
Comment #1
hass commentedDoes it makes any sense to have "Available support modules: category" and additional a module named "Taxonomy (Localizer/ Category)"? Looks like duplicate config option...
Comment #2
hass commentedComment #3
sunThere is more than one taxonomy module since we can't alter taxonomy.module in core without patching. So Localizer works with Taxonomy (Localizer) while your site will use regular Taxonomy module if you do not enable Localizer.
And since category.module also replaces taxonomy.module with a customized version, the third module, Taxonomy (Category/Localizer) is needed.
Comment #4
hass commentedWhat will happen if i activate all?
Comment #5
hass commentedAnd why should i check the box "Available support modules" > "category" under "admin/settings/localizer"? if the module "Taxonomy (Localizer/ Category)" is active you know it should be active, isn't it? This is different for views... however confusing as many other things.
Aside i cannot translate the strings "category" and "views".
Comment #6
Roberto Gerola commentedHaving multiple version of the same module in the list is causing too much confusion.
I prefer to have a clean and easy system where the user has the complete control on it.
If localizer crashed and you removed it, you are not more able to reset the modules
entry but in phpmyadmin.
It is sufficient to put the modified versions of the modules under sites/all/modules directory.
If something goes wrong or you want to disable localizer you can simply remove the files
from there.
Comment #7
sunJust placing the modified modules in sites/all/modules was also the first approach. But there are two reasons why this is not a working solution:
Comment #8
Roberto Gerola commentedI think that changing entries in system table is too much dangerous.
Scenario : you activate localizer, change the system table, your
website crash. You are not more able to restore the original entries
in system table.
Having multiple entries in module section can create a lot of confusion.
Comment #9
sunThen the only working solution is to step back to patching core files. We've thought hours about this issue. As long as there is no independent (3rd party) compatibility module which handles such replacements, each contrib module performing such tasks will break a site in certain scenarios.
Comment #10
Roberto Gerola commentedI have some proposals :
1. checks in Drupal core code the order of modules loading to be 100% sure the sites/all/modules
solution cannot work
2. for category taxonomy wrapper we could talk with category module author and see if we can cooperate
to merge our changes in some manner
3. patches for cache are already solved with the use of cache_inc settings variable.
We have to find a solution for menu, block and taxonomy.
Patch for menu is really really simple and it is more a bug fixing than a patch for
making localizer work.
Block : we could also think to write a specialized version of this module and call it,
for example : localizer_block.
If we are not able to find a solid solution we'll continue with patches, providing
to the users the already patched versions keeping them aligned with Drupal versions.
What do you think ?
Comment #11
sunThe 'localized' category wrapper module is only needed if someone wants to have legacy taxonomy support. I'm currently not sure, what is actually affected from category's taxonomy legacy implementation. The downside is that maintainers of Category module seem to be not very active, because a simple compatibility patch is in the queue for quite some time now.
Core modules can not be replaced with modules that have different names. If a replacement module has a different name, module_invoke() does not work anymore. Furthermore, there are contrib modules, theme engines and themes that rely on the existence of certain functions in those modules. Actually, this is the reason why this approach in 5.x-2.x broke some sites.
So, as long as the already mentioned, independent Compatibility module does not exist, patching core files is the only solution that is left. Additionally, we shouldn't provide already patched core files, because
Comment #12
hass commentedI don't like patching core and like this core module overwrite very much. Buf if this destroys internal data and i cannot turn of localizer any more this is no good idea! I think my test site gets broken yesterday, by removing the localizer directory only. this is a very bad behaviour...
Please read Gabors last comment in this thread http://drupal.org/node/130776 or start from top. He told me it is not possible to know about the order of language files... where the source of this problem is the module order in general. The order of modules or core modules is only build from the "inserted into SQL" order... i haven't verified this - but i trust him. So a core module can be ordered after localizer, but must not. So it looks like touching "system" table cannot be circumvented.
About the Taxonomy: It must be possibly to overwrite the original taxonomy in the way you overwrite "menu" module. Put some checks inside your patched taxonomy module and check if module_exist and then you know if category support is required or not. i have no idea why this shouldn't possible. this will stop confusion...
Comment #13
sun@hass: Sure, that sounds simple. However, please compare taxonomy.module in core with the taxonomy wrapper module of Category module in front of making assumptions. Merging both modules into one, including the necessary changes for Localizer is simply not maintainable, since we would have to react on any changes in taxonomy or category module and merge them accordingly into that module. Neither Roberto nor me would have the time to do and ensure that.
Comment #14
Roberto Gerola commented@sun
> It depends on the filesystem if the modules in /sites/all/modules are really indexed after core modules in /modules
Yes, it seems that sites/all is indexed after the main directory.
in includes/common.inc, function drupal_system_listing starting from row 2074.
For the modules it is called in module.inc in this manner :
Comment #15
sunBecause of this
you are not able to predict where a module is actually has to be placed to be found at last. Please bear in mind that Localizer should work with multi-site setups, too.
Don't get me wrong, I don't want to destruct all the options - it's just that we've really thought countless hours about this issue and played with any scenario we were able to come up with. Sadly, we did not even find all possible scenarios, as you can see in the issues for 5.x-2.x.
Comment #16
Roberto Gerola commentedOk, clear.
We cannot be sure at 100% neither with this solution.
So, we should maintain the patches option.
in the past I've been contacted by some users that had some difficulties
to apply the patches, so, I'm thinking to a "mixed" approach.
Maintain the patches in the main package.
Don't distribute the already patched files in the package, but maintain
a page of instructions in the manual or on a website referenced in the
installation instructions where the users can download the already patched files
and where we explain where they can put these files : replacing the originals
or under sites/all/modules if they prefer, making clear what can be the uncertainty.
Not tried yet, but perhaps it could work also creating a directory like
sites/all/modules/localizer/taxonomy.
i would like to have an easy solution also for users with not much experience
and that doesn't touch too much its system.
if something goes wrong of if the user is not happy with localizer, he
should be able to easily remove it.
It is for these reasons that I'm struggling so much on this issue.
Thanks to all for thought and feedback sharing !
Comment #17
hass commentedyou can never be sure that the order of modules is correct... this maybe for new installation correct, but not for old upgrades... if you have a 4.6.x install, upgrade to 4.7.x and then to 5.x you will find that possibly a core module gets added to the system table after localizer has been added... you only need one core module that wasn't a core module in past! new core modules will be installed and my today inserted localizer...
have you read the link?
Comment #18
hass commented