A number of module tables, like taxonomy, don't need to be in system.install. This bundle of install files splits them out properly. It's a zip file because I have no cvs-fu, and don't know how to make a patch that adds files to core. ;)

Comments

chx’s picture

StatusFileSize
new26.78 KB

Added $Id$ and rolled a patch. Thanks Eaton!

eaton’s picture

Status: Active » Needs review

Works smashingly, though it does depend on http://drupal.org/node/73615 (a patch htat always forces system.module to install first, no matter what order things appear in).

Without #73615, menu.module tries to install first, before the variables table exists, etc.

So. Commit #73660, then this one. And the installer will be happy.

eaton’s picture

Version: 4.7.2 » x.y.z

This is CVS, clearly not 4.7.2

dries’s picture

#73615 (dependency) was committed. I'm cool with this patch.

dmitrig01’s picture

Version: x.y.z » 6.x-dev
Status: Needs review » Needs work

I have always wanted this, but it's a little late

dmitrig01’s picture

I have always wanted this, but it's a little late

pancho’s picture

Version: 6.x-dev » 7.x-dev

Now it's too late again... let's get it done in D7!

maartenvg’s picture

These are the tables that are created in system.install
- variable
- actions
- actions_aid
- batch
- blocked_ips
- cache
- cache_form
- cache_page
- cache_menu
- cache_registry
- files
- flood
- history
- menu_router
- menu_links
- registry
- registry_file
- sessions
- system
- url_alias

Which are save to move to their respective modules?

dave reid’s picture

Status: Needs work » Needs review
StatusFileSize
new4.41 KB

I'm thinking the only others that can be split is possibly url_alias. Everything else is needed by system.

Patch attached to split url_alias schema into path.install. Tested on fresh HEAD install and upgraded HEAD install.

dave reid’s picture

Title: Drupal installer: split out more module install files » Split out path.install from system.install
StatusFileSize
new4.42 KB

Since there's only one module left to be split out from system.install, renaming the issue. Revised patch with the fetchField() from DBTNG.

Status: Needs review » Needs work

The last submitted patch failed testing.

dave reid’s picture

Assigned: Unassigned » dave reid
Status: Needs work » Needs review
StatusFileSize
new4.97 KB

Re-roll.

catch’s picture

Status: Needs review » Needs work

the $paths_enabled check should be a module_exists('path') - this was tried a while back but had to be reverted because module_list was broken, I think it's less broken now so it should be fine to do now. That'd then save us the COUNT() query altogether since whether path module is enabled is a sufficient check in itself.

dave reid’s picture

Status: Needs work » Needs review
StatusFileSize
new4.82 KB

Yeah I suppose that would be a better check. Easy enough of a fix!

catch’s picture

We can still kill the COUNT() though. I realise this has nothing to do with the purpose of the patch, so leaving at CNR.

Status: Needs review » Needs work

The last submitted patch failed testing.

dave reid’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new5.16 KB

For some reason, module_exists does not work there. It returns FALSE even though the module is enabled. Switching back to db_table_exists and removing the $count stuff.

catch’s picture

Status: Needs work » Reviewed & tested by the community

hmm, module_list() is still broken then. You left a commented module_exists() check in the patch though. I think this means #12 is RTBC anyway. Sorry for derailment.

drewish’s picture

Status: Needs review » Needs work

#12 no longer applies but #17 applies (with minor fuzz) and installs correctly, path.module enables correctly but trying to uninstall path.module throws an exception:

Fatal error: Exception thrown without a stack frame in Unknown on line 0
drewish’s picture

Ah watchdog had this to offer:

PDOException: SELECT dst FROM {url_alias} WHERE src = ? AND language IN(?, '') ORDER BY language DESC - Array ( [0] => admin/build/modules/uninstall [1] => en ) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dh.url_alias' doesn't exist in drupal_lookup_path() (line 68 of /Users/amorton/Sites/dh/includes/path.inc).

dave reid’s picture

dave reid’s picture

Title: Split out path.install from system.install » Allow path module to be uninstalled
Component: base system » path.module
dave reid’s picture

Status: Needs work » Needs review
StatusFileSize
new5.32 KB

Gave this a re-roll now that module_exists() looks like it works within drupal_lookup_path(). I tried uninstalling the module and it worked successfully.

catch’s picture

I know it's scope creep, but if module_exists() actually works at that stage, can we pretty please kill the SELECT COUNT(*) in drupal_lookup_path()? If not this at least gets me subscribed so I can revive the old patches which did this.

Everything looks good, so if the test bot says yes, ought to be RTBC.

dave reid’s picture

I guess it's reasonable to assume that we can remove the count query since if the path module is installed, then it's assumed that the user is actually using some url aliases.

catch’s picture

There's a small chance that someone has path installed and no aliases, then they'll get lots of no-op queries, but there's a guarantee that every other Drupal site gets the count query on every page request, so overall, it'll be less ;)

dave reid’s picture

StatusFileSize
new6.02 KB

Revised patch just using module_exists().

Status: Needs review » Needs work

The last submitted patch failed testing.

David_Rothstein’s picture

I'm not sure this patch makes sense because it ties path.inc (an API for having URL aliases) to path.module (one particular user interface for managing them). See the discussion at #196862: COUNT(*) is an expensive query in InnoDB. also.

dave reid’s picture

The function drupal_lookup_path has always been tied to path.module. The {url_alias=} table should have always been tied to the path.module as well and allowed it to be uninstalled. Nothing is being changed in that respect. It's only allowing path.module to be uninstalled.

David_Rothstein’s picture

Looking at the current code for drupal_lookup_path(), I'm having trouble seeing how it is tied to path.module..... in fact, if I disable path.module on existing site, the drupal_lookup_path() function continues to get called, and my previous URL aliases continue to work. To me, that's the expected behavior.

Consider this scenario: Someone wants to write a contrib module that provides a totally different user interface for managing URL aliases. Instead of the long admin screen and the collapsible fieldset on nodes provided by path.module, they want to do it completely differently. Currently, this would work fine -- someone who wants to try out the new module would just disable the core Path module, install the new one, and everything would work OK. However, if this patch goes in, how would they do it? If they disable the core Path module, their URL aliases would all be broken in the meantime. And if they made the mistake of uninstalling the core Path module, then all their URL aliases would be gone forever and they'd have to start completely from scratch.

I kinda do see the utility of a "delete all URL aliases on my site" kind of functionality, but I just don't think it's something that should happen automatically when the Path module is uninstalled. Not the way the Path module currently works, at any rate.

dave reid’s picture

I guess in that scenario, the contrib module might want to provide a different data structure and load it's own 'path_include' variable. I was always in the assumption that if the path module was disabled/uninstalled, then node aliases should not work.

I guess we should get more opinions on which direction to take as far as what should happen when path is disabled/uninstalled.

xano’s picture

Subscribing.

dave reid’s picture

Version: 7.x-dev » 8.x-dev

Too late for D7. Bumping to D8.

valthebald’s picture

Issue summary: View changes
Issue tags: +Needs reroll
superspring’s picture

Assigned: dave reid » Unassigned
Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new4.35 KB

The install script has been moved from the system module to the path module.

Status: Needs review » Needs work

The last submitted patch, 36: 73660-path-install-36.patch, failed testing.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev
quietone’s picture

Version: 9.3.x-dev » 8.9.x-dev
Status: Needs work » Closed (outdated)

This was fixed sometime in Drupal 8, although I don't know when, so changing version to the last Drupal 8 version.

Therefore, closing as outdated.

Thanks!