MetaModels / core

MetaModels Core Module
GNU Lesser General Public License v3.0
96 stars 42 forks source link

Frontend 'Detail-Link' (Filter, Alias, auto_item) doesn't work. #1037

Closed michaelgawlik closed 8 years ago

michaelgawlik commented 8 years ago

Checklist before I submit this issue report

I confirm that:

(Please fill in the actual values from your environment)

Key Value Comments
PHP version: 5.6.23
Contao version: 3.5.15
MetaModels version: 2.0.0-alpha14
Installation via composer: yes
Installed MetaModels packages: bundle_all
DCG version: 2.0.0-beta38

Issue description

Frontend 'Detail-Link' (Filter, Alias, auto_item) doesn't work.

`[06-Sep-2016 17:29:48 Europe/Berlin] PHP Fatal error: Uncaught exception 'RuntimeException' with message 'Could get metamodel id: 0' thrown in J:\Projekte___Xampp\htdocs\pura\composer\vendor\metamodels\core\src\MetaModels\ItemList.php on line 361

0 J:\Projekte___Xampp\htdocs\pura\composer\vendor\metamodels\core\src\MetaModels\ItemList.php(270): MetaModels\ItemList->prepareMetaModel()

1 J:\Projekte___Xampp\htdocs\pura\composer\vendor\metamodels\core\src\MetaModels\FrontendIntegration\HybridList.php(104): MetaModels\ItemList->setMetaModel('0', '0')

2 J:\Projekte___Xampp\htdocs\pura\system\modules\core\classes\Hybrid.php(239): MetaModels\FrontendIntegration\HybridList->compile()

3 J:\Projekte___Xampp\htdocs\pura\composer\vendor\metamodels\core\src\MetaModels\FrontendIntegration\MetaModelHybrid.php(102): Contao\Hybrid->generate()

4 J:\Projekte___Xampp\htdocs\pura\composer\vendor\metamodels\core\src\MetaModels\FrontendIntegration\HybridList.php(54): MetaModels\FrontendIntegration\MetaModelHybrid->generate()

5 J:\Projekte___Xampp\htdocs\pura\system\modules\core\library\Contao\Controller.php(321): MetaModels\FrontendIntegration\HybridList->generate()

6 J:\Projekte___Xampp\htdocs\pura\system\modules\core\pages\PageRegular.php(137): Contao\Controller::getFrontendModule(Object(Contao\ModuleModel), 'Offer')

7 J:\Projekte___Xampp\htdocs\pura\system\modules\core\controllers\FrontendIndex.php(285): Contao\PageRegular->generate(Object(Contao\PageModel), true)

8 J:\Projekte___Xampp\htdocs\pura\index.php(20): Contao\FrontendIndex->run()

9 {main}`

But there is no MM with ID 0 ... it starts by 1.

Steps to reproduce

  1. installed fresh MM via composer (bundle_all)
  2. create a new MM with 'Title', 'Alias' and 'Notes' as attributes
  3. a.s.o see https://de.contaowiki.org/MetaModels_Beispiel_2

    Describe the behaviour of the application

    • Listview works great
    • produced links are looking great
    • by klicking these the fatal error occures
zonky2 commented 8 years ago

do you work with a multilanguage metamodels?

michaelgawlik commented 8 years ago

no,

normaly I check translation, choose 'German', check fallback language and thats it.

so I read about the 'alias - translation' issue and create a new MM without any translation box checked.

same behavior.

zonky2 commented 8 years ago

its possible to post your filter rule(s) as screenshot

michaelgawlik commented 8 years ago

here it is:

bildschirmfoto 2016-09-06 um 19 20 05
michaelgawlik commented 8 years ago

checked it at home on another project (same contao, dcg and mm-versions) - can't reproduce the error.

zonky2 commented 8 years ago

hmm... may be "make new" - https://community.contao.org/de/showthread.php?45309-Contao-2-11-x-Detailseite-zeigt-nur-noch-Fehler-nach-dem-L%F6schen-eines-Kind-Models&p=293078&viewfull=1#post293078

michaelgawlik commented 8 years ago

I removed Metamodels + my mm_tables completly... but I left different modules (mm lists) on some sites. Not those that I used.

Now I cleaned up a bit better (deleted every mm-list (ce) + all mm-modules) ... et voilà - it works!

zonky2 commented 8 years ago

hmm..? magic...