During migration it would be handy if you could remove:

files/civicrm/templates_c/en_US/ConfigAndLog/Config.IDS.ini

As the filter_path to default_filter.xml is hardcorded with the pre-migration platforms path causing a 500 error as the path no longer exists.

Thanks

Bails

Comments

mrfelton’s picture

Status: Active » Needs review
StatusFileSize
new1.22 KB

I've added this into the civicrm_config_update task, which also gets called on verification.

mrfelton’s picture

Slightly revised

bgm’s picture

Thanks for the patch.

I reworked it a bit and committed it to 6.x-1.x:
http://drupalcode.org/project/provision_civicrm.git/commit/fdd888c

* added the code in _provision_civicrm_fixpermissions(), which is called from Verify
* used provision_file()->unlink() instead of unlink()

I also did a few tests. This bug is hard to reproduce, although I have seen it in the past. I suspect it's one of those bugs where it will depend on who created the template_c/en_US/ directory. From the tests I did, even when the directory is created by Apache, it gets correct setgid permissions and the aegir user can delete the directory.

When those permissions are correct, Verify calls 'civicrm_cache_clear', which deletes the ConfigAndLog directory (including the Config.IDS.ini).

When the Config.IDS.ini causes an Apache 500 page error, it's usually because aegir could not delete the ConfigAndLog directory during civicrm_cache_clear, and in those cases, explicitly deleting the Config.IDS.ini will not help.

mrfelton: when you encountered that bug, was it on sites created with an old version of provision_civicrm? Can you check if you could reproduce the bug before/after this patch?

mrfelton’s picture

This needs to happen when you run the update config command too. Patch attached.

pauleb’s picture

Thanks folks! I got into this problem the second time and of course forgot how to solve it.

btw: The 6.x-1.x-beta1 is getting a bit old. Is there a -dev Version to download, should I git clone and work with the current HEAD or is applying the patches from the issue queues the way to get the best working version?

But nonetheless thanks for this great module and this patch!

mrfelton’s picture

@pauleb you should probably use 6.x-1.x from git, with several patches applied!

bgm’s picture

Title: Remove Config.IDS.ini » Remove Config.IDS.ini before migration

Perhaps hi-jacking this old bug, but I recently had a weird issue where the site was including files from an older platform (during migrate) because the ConfigIDS had not been deleted. - causing "cannot redeclare function ..." (getVersion or stuff like that).

bgm’s picture

Status: Needs review » Fixed

Committed to 6.x-1.x more strict deletion of the Config.IDS.ini files. See: #1778254: Cannot redeclare civicrmversion().

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.