BUG? Extra brackets getting added to concrete.php overrides
PermalinkEvery so often the site goes down totally and I have to look in the Apache error log to find the issue which unless I've broken something is usually:
With the issue being extra array brackets being added into concrete.php. I'm not touching this file at all (except to delete these brackets.
69 'enabled' => true, 70 'validate_email' => false, 71 'notification' => null, 72 'notification_email' => false, 73 ], 74 ], 75 ]; 76 ], <------------- these 77 ], <------------- 78 ]; <-------------
The only thing manipulating this file is this in the package controller
public function on_start() { \Route::setThemeByRoute('/login', 'tog_main'); \Route::setThemeByRoute('/register', 'tog_main'); \Route::setThemeByRoute('/page_not_found', 'tog_main'); \Route::setThemeByRoute('/dashboard/welcome', 'tog_main'); // override dash RHS panel $objEnv = Environment::get(); $objEnv->overrideCoreByPackage('elements/panels/dashboard.php', $this); $objEnv->overrideCoreByPackage('views/panels/add.php', $this); // // override marketplace, welcome popup, etc \Config::save('concrete.marketplace.enabled', false); \Config::save('concrete.marketplace.intelligent_search', false); \Config::save('concrete.external.intelligent_search_help', false); \Config::save('concrete.external.news_overlay', false);
I did a package upgrade today when I added a block to it but I couldn't say that package updates consistently caused this issue. It's happen maybe 3-4 times over the course of building this package (3 months) though there's not one specific thing I could say causes this to happen.
Should this be logged as a bug or am I doing something wrong somehow? Thought it best to run it past the community before logging it.
);
To the array that's generated and caused the site to crash. I have no idea why this is happening. Only occurs every once and a while. I've also had it happen on one other site as well. I tried to figure out why but had no luck. Any ideas?
I assume the install and upgrade methods of the package controller don't get run every time, just the on_start() which in my case contains some defines plus:
\Config::save('concrete.email.validate_registration.address', 'noreply@mysite.co.uk'); \Config::save('concrete.email.validate_registration.name', 'My site name'); \Route::setThemeByRoute('/login', 'debs'); \Route::setThemeByRoute('/register', 'debs'); \Route::setThemeByRoute('/page_not_found', 'debs'); \Route::setThemeByRoute('/dashboard/welcome', 'debs'); \Route::setThemeByRoute('/login/callback/concrete/email_validated', 'debs');
https://www.concrete5.org/developers/bugs/8-4-2/extra-square-bracket...
I would see if you can find a pattern and document the steps to reproduce the issue.
On a test setup, install and uninstall the package repeatedly to see when, and if, the issue occurs.