-
-
Notifications
You must be signed in to change notification settings - Fork 8
Attempted to load class \"Config\" from the global namespace. #64
Comments
|
If you use the standard edition, you have to update your application configuration after updates. Make sure your app files and web entry points are in sync with the standard edition.
|
|
They are. As I already mentioned this also happens in a completely fresh installation of the standard-edition |
|
I've now setup several Contao 4.4.0 projects using Composer and got similar errors that seem to fit this issue. Yesterday I aditionally installed Isotope. Everything worked fine. |
|
Looks like the Contao framework is not correctly bootet, the Contao class loader does not work. I don't have an explanation out of my head why this would happen in the standard-edition but not managed-edition. I assume you correctly registered all bundles in the kernel…? |
|
While I encounted this problem I also set-up a managed edition, to see what happens. There I got the same errors. AppKernel was edited to load additional modules in the right order. |
|
Interesting. Can you post a |
|
sure, I compared this installation with a working one and see no difference, despite the fact that Isotope is installed. |
|
You're not using Authoritative class maps right? |
|
Right, i'm not using this. |
|
Interestingly I am able to reproduce this problem (Attempted to load class "Config") permanently by installing any extension which has a In my case it doesn't even matter where exactly this file is located as long as it's in Does any Autoloader try to scan this folder and gets somehow confused by the |
|
Upon further inspection this problem seems to be related to the installation-bundle rather than the standard-edition. Trying to get Isotope running yields fatal errors where some classes are not found and this error printing is a pure PHP error, not a Symfony one. In conclusion there seems to be some autoloading related problems in the installation-bundle. |
|
Does this issue only occur on windows machines? |
|
Yep, Windows only. Never encountered such problems on a Linux machine.
Unfortunately Windows is our main development platform.
|
|
Here are two more cases:
I am developing on Windows as well - though I never encountered this issue so far. |
What's weird though is that only the |
|
@fritzmg If the |
|
I see. Looking at the https://github.com/contao/installation-bundle/blob/4.4.2/src/Controller/InstallationController.php#L63 this could happen if $this->container->has('contao.framework')returns However, under what circumstances does Same story with |
|
Das Problem tritt dann auf, wenn InstallationController.php#L59-L61 einen Fehler wirft, Z.B. fehlerhafte Symlinkerstellung unter Windows. Ist dies der Fall, ruft InstallationController.php#L127-L131 die Methode |
|
I was able to reproduce the problem under Linux as well. If the PHP process is unable to create symlinks, this error will occur. I can confirm the conclusion of @dmolineus |
|
Proposed fix: /**
* Initializes the application.
*
* @return Response|null
*/
private function initializeApplication()
{
$event = new InitializeApplicationEvent();
$this->container->get('event_dispatcher')->dispatch(ContaoInstallationEvents::INITIALIZE_APPLICATION, $event);
if ($event->hasOutput()) {
return $this->render('initialize.html.twig', [
'output' => $event->getOutput(),
+ 'ua' => '',
]);
}
return null;
}Since the Contao Framework is definitely not initialized yet when I'd like a more robust solution for this though. |
|
Shouldn’t this be fixed in installation-bundle/src/Controller/InstallationController.php:589 by checking against |
|
Yes, but you would also need a |
|
Yes: if (
$this->container->has('contao.framework')
&& $this->container->get('contao.framework')->isInitialized()
) {
$context['ua'] = Environment::get('agent')->class;
} |
|
So in total it would be if (!isset($context['ua']) &&
$this->container->has('contao.framework') &&
$this->container->get('contao.framework')->isInitialized()) {
$context['ua'] = Environment::get('agent')->class;
} |
|
Fixed in contao/installation-bundle@f04da58. |

Just tried to update to Contao 4.4, even tried a fresh installation of the standard-edition.
In both cases I end up with the following exception:
Some users in the forums have the same problem while the managed-edition seems to run fine.
The text was updated successfully, but these errors were encountered: