Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Contao3] Class 'MetaModels\Helper\UpgradeHandler' not found #303

Closed
HellPat opened this issue Sep 30, 2013 · 37 comments
Closed

[Contao3] Class 'MetaModels\Helper\UpgradeHandler' not found #303

HellPat opened this issue Sep 30, 2013 · 37 comments

Comments

@HellPat
Copy link

HellPat commented Sep 30, 2013

Fatal error: Class 'MetaModels\Helper\UpgradeHandler' not found in /system/modules/metamodels/config/runonce.php on line 18

=> Contao3 Nightly

@ghost
Copy link

ghost commented Sep 30, 2013

Hast du eine Datenbank Aktualisierung im BE vorgenommen ?

@memikeandi
Copy link

I get the same error, and it wont install and dont show up in backend

@ghost
Copy link

ghost commented Sep 30, 2013

did you refreshed your database in the backend ?

@memikeandi
Copy link

Yes, i tried that. But it doesn´t work, it results in a completely blank page. Guess due to the original problem, that makes the install.php stop

@HellPat
Copy link
Author

HellPat commented Oct 1, 2013

Yes, i did.

This was referenced Oct 2, 2013
@rburch
Copy link

rburch commented Oct 2, 2013

Had the same issue, happened when I put my install tool PW in.

@memikeandi
Copy link

I deleted the runonce.php, then I was able to install and update the database, but metamodels wont´t show up in back-end at all...

@phreak
Copy link

phreak commented Oct 8, 2013

Experience the errors as well. C 3.1.3. Not Install-Tool open the install-tool and to update the database in the backend. Anyone knows a quick-fix?

@stefanheimes
Copy link
Member

Hi,

i try to get the same error, but i was not able to reproduce it. So can you take a look in the contao log or php error log for more informations ? i have no idea why you have such problems.

@memikeandi
Copy link

The error log says the same thing:

[25-Sep-2013 09:18:54 GMT] PHP Fatal error: Class 'MetaModels\Helper\UpgradeHandler' not found in /Applications/MAMP/htdocs/basictemplate/system/modules/metamodels/config/runonce.php on line 18

And also this:

[25-Sep-2013 09:19:32 GMT] PHP Fatal error: Class 'MetaModels\Dca\MetaModel' not found in /Applications/MAMP/htdocs/basictemplate/system/modules/metamodelsattribute_translatedtags/dca/AttributeTranslatedTags.php on line 29

@cptshit
Copy link

cptshit commented Oct 8, 2013

Hi Stefan,

my error log is this:

[17-Sep-2013 13:00:18 UTC] PHP Fatal error:  Class 'MetaModels\Helper\UpgradeHandler' not found in /var/www/virtual/cptshit/html/mm/system/modules/metamodels/config/runonce.php on line 18
[17-Sep-2013 13:00:19 UTC] PHP Fatal error:  Class 'MetaModels\Helper\UpgradeHandler' not found in /var/www/virtual/cptshit/html/mm/system/modules/metamodels/config/runonce.php on line 18
[17-Sep-2013 13:00:26 UTC] PHP Fatal error:  Class 'MetaModels\Helper\UpgradeHandler' not found in /var/www/virtual/cptshit/html/mm/system/modules/metamodels/config/runonce.php on line 18
[17-Sep-2013 13:00:49 UTC] PHP Fatal error:  Class 'MetaModels\Helper\UpgradeHandler' not found in /var/www/virtual/cptshit/html/mm/system/modules/metamodels/config/runonce.php on line 18
[17-Sep-2013 13:00:51 UTC] PHP Fatal error:  Class 'MetaModels\Helper\UpgradeHandler' not found in /var/www/virtual/cptshit/html/mm/system/modules/metamodels/config/runonce.php on line 18
[17-Sep-2013 13:00:53 UTC] PHP Fatal error:  Class 'MetaModels\Helper\UpgradeHandler' not found in /var/www/virtual/cptshit/html/mm/system/modules/metamodels/config/runonce.php on line 18
[17-Sep-2013 13:15:43 UTC] 
PHP Warning: in_array() expects parameter 2 to be array, null given in /var/www/virtual/cptshit/html/mm/system/modules/core/library/Contao/System.php on line 110
#0 [internal function]: __error(2, 'in_array() expe...', '/var/www/virtua...', 110, Array)
#1 /var/www/virtual/cptshit/html/mm/system/modules/core/library/Contao/System.php(110): in_array('getInstance', NULL)
#2 /var/www/virtual/cptshit/html/mm/system/modules/core/library/Contao/Controller.php(2274): Contao\System->import('MetaPalettes')
#3 /var/www/virtual/cptshit/html/mm/system/modules/core/dca/tl_article.php(17): Contao\Controller->loadDataContainer('tl_page')
#4 /var/www/virtual/cptshit/html/mm/system/modules/core/library/Contao/Controller.php(2264): include('/var/www/virtua...')
#5 /var/www/virtual/cptshit/html/mm/system/modules/core/library/Contao/DcaExtractor.php(291): Contao\Controller->loadDataContainer('tl_article')
#6 /var/www/virtual/cptshit/html/mm/system/modules/core/library/Contao/DcaExtractor.php(114): Contao\DcaExtractor->createExtract()
#7 /var/www/virtual/cptshit/html/mm/system/modules/core/library/Contao/Database/Installer.php(292): Contao\DcaExtractor->__construct('tl_article')
#8 /var/www/virtual/cptshit/html/mm/system/modules/core/library/Contao/Database/Installer.php(115): Contao\Database\Installer->getFromDca()
#9 /var/www/virtual/cptshit/html/mm/system/modules/core/library/Contao/Database/Installer.php(47): Contao\Database\Installer->compileCommands()
#10 /var/www/virtual/cptshit/html/mm/system/modules/repository/classes/RepositoryManager.php(474): Contao\Database\Installer->generateSqlForm()
#11 /var/www/virtual/cptshit/html/mm/system/modules/repository/classes/RepositoryBackendModule.php(150): RepositoryManager->update('database')
#12 /var/www/virtual/cptshit/html/mm/system/modules/core/classes/BackendModule.php(100): RepositoryBackendModule->compile()
#13 /var/www/virtual/cptshit/html/mm/system/modules/repository/classes/RepositoryBackendModule.php(72): Contao\BackendModule->generate()
#14 /var/www/virtual/cptshit/html/mm/system/modules/repository/classes/RepositoryManager.php(50): RepositoryBackendModule->generate()
#15 /var/www/virtual/cptshit/html/mm/system/modules/core/classes/Backend.php(266): RepositoryManager->generate()
#16 /var/www/virtual/cptshit/html/mm/contao/main.php(129): Contao\Backend->getBackendModule('repository_mana...')
#17 /var/www/virtual/cptshit/html/mm/contao/main.php(273): Main->run()
#18 {main}

[17-Sep-2013 13:15:43 UTC] PHP Fatal error:  Class 'MetaPalettes' not found in /var/www/virtual/cptshit/html/mm/system/modules/core/library/Contao/System.php on line 110
[17-Sep-2013 13:15:45 UTC] 
PHP Warning: in_array() expects parameter 2 to be array, null given in /var/www/virtual/cptshit/html/mm/system/modules/core/library/Contao/System.php on line 110
#0 [internal function]: __error(2, 'in_array() expe...', '/var/www/virtua...', 110, Array)
#1 /var/www/virtual/cptshit/html/mm/system/modules/core/library/Contao/System.php(110): in_array('getInstance', NULL)
#2 /var/www/virtual/cptshit/html/mm/system/modules/core/library/Contao/Controller.php(2274): Contao\System->import('MetaPalettes')
#3 /var/www/virtual/cptshit/html/mm/system/modules/core/dca/tl_article.php(17): Contao\Controller->loadDataContainer('tl_page')
#4 /var/www/virtual/cptshit/html/mm/system/modules/core/library/Contao/Controller.php(2264): include('/var/www/virtua...')
#5 /var/www/virtual/cptshit/html/mm/system/modules/core/library/Contao/DcaExtractor.php(291): Contao\Controller->loadDataContainer('tl_article')
#6 /var/www/virtual/cptshit/html/mm/system/modules/core/library/Contao/DcaExtractor.php(114): Contao\DcaExtractor->createExtract()
#7 /var/www/virtual/cptshit/html/mm/system/modules/core/library/Contao/Database/Installer.php(292): Contao\DcaExtractor->__construct('tl_article')
#8 /var/www/virtual/cptshit/html/mm/system/modules/core/library/Contao/Database/Installer.php(115): Contao\Database\Installer->getFromDca()
#9 /var/www/virtual/cptshit/html/mm/system/modules/core/library/Contao/Database/Installer.php(47): Contao\Database\Installer->compileCommands()
#10 /var/www/virtual/cptshit/html/mm/system/modules/repository/classes/RepositoryManager.php(474): Contao\Database\Installer->generateSqlForm()
#11 /var/www/virtual/cptshit/html/mm/system/modules/repository/classes/RepositoryBackendModule.php(150): RepositoryManager->update('database')
#12 /var/www/virtual/cptshit/html/mm/system/modules/core/classes/BackendModule.php(100): RepositoryBackendModule->compile()
#13 /var/www/virtual/cptshit/html/mm/system/modules/repository/classes/RepositoryBackendModule.php(72): Contao\BackendModule->generate()
#14 /var/www/virtual/cptshit/html/mm/system/modules/repository/classes/RepositoryManager.php(50): RepositoryBackendModule->generate()
#15 /var/www/virtual/cptshit/html/mm/system/modules/core/classes/Backend.php(266): RepositoryManager->generate()
#16 /var/www/virtual/cptshit/html/mm/contao/main.php(129): Contao\Backend->getBackendModule('repository_mana...')
#17 /var/www/virtual/cptshit/html/mm/contao/main.php(273): Main->run()
#18 {main}

[17-Sep-2013 13:15:45 UTC] PHP Fatal error:  Class 'MetaPalettes' not found in /var/www/virtual/cptshit/html/mm/system/modules/core/library/Contao/System.php on line 110

Greetings,

Henrik

@andreasisaak
Copy link
Contributor

which php version do you use?

@cptshit
Copy link

cptshit commented Oct 8, 2013

I'm at Uberspace. Let me lie... It's PHP 5.4.7
Any problems with this version?

Thanx and have a nice evening,

Henrik

2013/10/8 Andreas Isaak notifications@github.com

which php version do you use?


Reply to this email directly or view it on GitHubhttps://github.com//issues/303#issuecomment-25919613
.

@HellPat
Copy link
Author

HellPat commented Oct 8, 2013

I have the same hosting.

@memikeandi
Copy link

Im using php 5.4.10

@memikeandi
Copy link

Did a clean installation of Contao 3.1.3 and with with the latest medamodels alpha, and now this happens instead

Warning: in_array() expects parameter 2 to be array, null given in system/modules/core/library/Contao/System.php on line 110
#0 [internal function]: __error(2, 'in_array() expe...', '/Applications/M...', 110, Array)
#1 system/modules/core/library/Contao/System.php(110): in_array('getInstance', NULL)
#2 system/modules/core/library/Contao/Controller.php(2288): Contao\System->import('MetaPalettes')
#3 system/modules/core/dca/tl_article.php(17): Contao\Controller->loadDataContainer('tl_page')
#4 system/modules/core/library/Contao/Controller.php(2278): include('/Applications/M...')
#5 system/modules/core/library/Contao/DcaExtractor.php(291): Contao\Controller->loadDataContainer('tl_article')
#6 system/modules/core/library/Contao/DcaExtractor.php(114): Contao\DcaExtractor->createExtract()
#7 system/modules/core/library/Contao/Database/Installer.php(292): Contao\DcaExtractor->__construct('tl_article')
#8 system/modules/core/library/Contao/Database/Installer.php(115): Contao\Database\Installer->getFromDca()
#9 system/modules/core/library/Contao/Database/Installer.php(47): Contao\Database\Installer->compileCommands()
#10 contao/install.php(214): Contao\Database\Installer->generateSqlForm()
#11 contao/install.php(1001): InstallTool->run()
#12 {main}

Edited by Andreas Isaak / Formatting php code

Fatal error: Class 'MetaPalettes' not found in /Applications/MAMP/htdocs/metamodels-3/system/modules/core/library/Contao/System.php on line 110

@andreasisaak
Copy link
Contributor

@memikeandi PLEASE wrap your PHP-Code!!! You create stupid ticket references!

@andreasisaak
Copy link
Contributor

@lindesbs
Copy link

Update via composer in C2.11.12
Same issue.
MetaModelsUpgradeHandler is nowhere in the installation available.

Trying to install
metamodels/bundle_all 1.0.0 Referenz: 87ac63d2

At that moment, when this Excpetion is thrown, the files were not saved in the filesystem.
no other files from that directory were available except the runonce.php : https://github.com/MetaModels/core/tree/1.0.0/src/system/modules/metamodels/config

I don`t know the internal structure from composer, but maybe he triggers internal Contao methods.
Maybe the runonce skript has to be triggered AFTER everything is stored, or the runonce method has to check, if the class is available.

@AgentCT
Copy link

AgentCT commented Nov 16, 2013

Auch mit Contao 3.2 RC1 geht der Installer gar nicht mehr, es wird auch nur die o.g. Fehlermeldung ausgeworfen.

Gibt es eine kurzfristige Lösung für das Problem?

@frankcom
Copy link

frankcom commented Dec 2, 2013

Leider gleiches Problem hier - PHP Version ist 5.4.x

Gibt schon was neues? :) Danke für Eure Mühen!

@andreasisaak
Copy link
Contributor

@AgentCT Wenn möglich, versuchs mal mit Composer. Damit habe ich keine Probleme mehr.

@frankcom
Copy link

frankcom commented Dec 2, 2013

Edit1: Gerade von Bekanntem Link erhalten:

https://community.contao.org/de/showthread.php?45537-MetaModels-Composer

Edit2: Nachdem es aber kein Zurück mehr auf alte Repo gibt, werde ich noch drauf verzichten.

Danke trotzdem!

@andreasisaak
Copy link
Contributor

Wieso sollte man das Repo 3x am Tag wechseln? Entweder nutze ich das ER2 oder Composer?

@matthiasott
Copy link

I get the same error after entering the install tool password. Any ideas/solutions?

@stefanheimes
Copy link
Member

Sorry, we are not able to reproduce this error on our web server. The best way to fix this is when somebody creates a test system for us with this error. So we are able to debug it.

@stefanheimes
Copy link
Member

I think the main problem is the cache from contao. If someone got this bug can you please try something. Remove the files under "system\cache\config" and don't forget to make a backup. It is possible that the cache has a link to an older file.

@xchs
Copy link
Contributor

xchs commented Jan 11, 2014

@stefanheimes I've just tried what you suggested. However, that makes no difference – the issue is still there.

The problem occurs even with a new, fresh vanilla installation, i.e. without any internal cache files.

How to reproduce:

Then you will immediately get the error message

Fatal error: Class 'MetaModels\Helper\UpgradeHandler' not found in /system/modules/metamodels/config/runonce.php on line 18

@stefanheimes
Copy link
Member

@xchs thanks for the howto i will try it in the next days.

@dbfs
Copy link

dbfs commented Jan 14, 2014

funny, i got the same problem... but after a page-reloads the install-tool loaded properly again and i was able to update the DB and everything works fine!

@andreasisaak
Copy link
Contributor

Same here on a contao 3.1.4 project. The internal cache is the problem. Simply reset or disable the internal cache and the error message is gone! Sorry but more we can not do.

@cepharum
Copy link

cepharum commented Jun 5, 2014

tested using PHP 5.3.21-p12-gentoo on apache 2.2.24 with mysql 5.1.67

confirming @xchs in

  • having extracted vanilla tgz of Contao 3.3.x into web folder
  • having added nightly of meta model 2.x sneak preview
  • chowning all files' owner and group to web server, world-readable, group-readable, user-writable
  • invoking contao install tool -> failed with fatal error on missing MetaModels/BackendIntegration/Boot
  • removing all metamodel folders from system/modules
  • properly processing install tool of contao
    • on first login into backend: no backend module of MetaModel visible except for nightly stats list
  • adding whole nightly of meta model again
    • still no backend module of MetaModel visible except for nightly stats list
  • opening extension repository
  • choosing update database -> failed with fatal error on missing MetaModels/Helper/UpgradeHandler
  • returning to system maintenance for clearing internal cache
  • all backend views fail with fatal error on missing MetaModels/BackendIntegration/Boot now
  • tried adding missing classes explicitly using ClassLoader::addClasses() in metamodels/config/autoload.php, but stopped doing so after having added 6 or 7 classes for it seems to completely fail on scanning meta models for contained namespaces and classes.

@zonky2
Copy link
Contributor

zonky2 commented Dec 8, 2014

und ich dachte die Sache ist gefixt :-(

Fatal error: Class 'MetaModels\Helper\UpgradeHandler' not found in /var/www/xyz/html/contao/system/modules/!metamodels-tng-branch/config/runonce_0.php on line 19

Contao 3.3.7
TNG "von heute" 08.12.2014

@discordier
Copy link
Member

Cache geleert? @tristanlins hatte gestern genau dasselbe Problem.

@zonky2
Copy link
Contributor

zonky2 commented Dec 8, 2014

der interne Cache war nicht aufgebaut - steht alles auf "0"

ich habe die "Installation" nochmal über /contao/install.php probiert, mit gleicher Fehlermeldung - bei Zurück auf die BE-Seite repository erschien eine Fehlermeldung zu einer fehlenden Spalte (kein Screenshot) ... irgendwas mit jumpTo ??

nochmal auf /contao/main.php gegangen und plötzlich war der Eintrag MM vorhanden...hmmm??

beim ersten Test erstmal keine weiteren Auffälligkeiten

@JanMalte
Copy link
Contributor

Beim ersten Durchlauf der Installation von MM wird versucht der Wert von der einen Spalte in die andere zu kopieren. Dies wird zum Beispiel durch folgenden Code ausgelöst:
https://github.com/MetaModels/core/blob/tng/src/MetaModels/Helper/UpgradeHandler.php#L56

@Zeromax
Copy link
Contributor

Zeromax commented Nov 2, 2015

Habe das Problem auch.
Jeweils via Install tool upgrade und die Dateien nicht via Composer sondern aus der Zip Datei.

Folgender Workflow

  • unter Contao 3.2 Upgrade MM1 auf MM2
  • Contao 3.2 mit MM2 upgrade auf Contao 3.5.4
  • DB Update Schritt auf 3.3 kein Problem
  • DB Update Schritt auf 3.5 den folgenden Fehler
( ! ) Fatal error: Class 'MetaModels\Helper\UpgradeHandler' not found in /var/www/htdocs/projekt/system/modules/!metamodels-tng-branch/config/runonce_0.php on line 23
Call Stack
#   Time    Memory  Function    Location
1   0.0009  231608  {main}( )   .../install.php:0
2   0.1913  939552  Contao\BackendInstall->run( )   .../install.php:24
3   0.2188  1606168 Contao\BackendInstall->adjustDatabaseTables( )  .../BackendInstall.php:177
4   0.2189  1606304 Contao\Backend->handleRunOnce( )    .../BackendInstall.php:628
5   0.2467  1652256 include( '/var/www/htdocs/projekt/system/modules/!metamodels-tng-branch/config/runonce.php' )   .../Backend.php:273
6   0.2468  1653136 runonce_be4b5be1a9dece4d55082b9dd868885d->run( )    .../runonce.php:36
7   0.2505  1654192 require_once( '/var/www/htdocs/projekt/system/modules/!metamodels-tng-branch/config/runonce_0.php' )    .../runonce.php:14

Datei unter system\modules\!metamodels-tng-branch\config\runonce_0.php Zeile 23 auskommentiert dann lief es durch.

So wie es aussieht geht die runonce unter C3.5 nicht.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests