Closed zonky2 closed 8 years ago
mit dem NB vom 16.09. gibt es die eigenen templates nicht (mehr) in dem Template-Selectfeld - siehe Screenshots
Was passiert, wenn du das mal anders benennst? Dann müsste das doch klappen?
o.k. - mit umbenennen geht es und es kann auch gespeichert werden - m.E. wurde bis dato auch ein "mm_attr_checkbox (Music Academy)" angezeigt (?)
in der Listenansicht bleibt die Fehlermeldung :-(
Fatal error: Uncaught exception Exception with message Could not find template "mm_attr_checkbox_123" thrown in system/modules/core/library/Contao/TemplateLoader.php on line 127
#0 system/modules/metamodels/classes/src/MetaModels/Render/Template.php(313): Contao\TemplateLoader::getPath('mm_attr_checkbo...', 'html5')
#1 system/modules/metamodels/classes/src/MetaModels/Render/Template.php(357): MetaModels\Render\Template->getTemplate('mm_attr_checkbo...', 'html5', false)
#2 system/modules/metamodels/classes/src/MetaModels/Attribute/Base.php(400): MetaModels\Render\Template->parse('html5', false)
#3 system/modules/metamodels/classes/src/MetaModels/Item.php(101): MetaModels\Attribute\Base->parseValue(Array, 'html5', Object(MetaModels\Render\Setting\Simple))
#4 system/modules/metamodels/classes/src/MetaModels/Item.php(362): MetaModels\Item->internalParseAttribute(Object(MetaModels\Attribute\Checkbox\Checkbox), 'html5', Object(MetaModels\Render\Setting\Collection))
#5 system/modules/metamodels/classes/src/MetaModels/DcGeneral/Events/MetaModel/RenderItem.php(101): MetaModels\Item->parseValue('html5', Object(MetaModels\Render\Setting\Collection))
#6 [internal function]: MetaModels\DcGeneral\Events\MetaModel\RenderItem::render(Object(ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\ModelToLabelEvent), 'dc-general.view...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#7 system/modules/symfony-event-dispatcher/classes/Symfony/Component/EventDispatcher/EventDispatcher.php(164): call_user_func(Array, Object(ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\ModelToLabelEvent), 'dc-general.view...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#8 system/modules/symfony-event-dispatcher/classes/Symfony/Component/EventDispatcher/EventDispatcher.php(53): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'dc-general.view...', Object(ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\ModelToLabelEvent))
#9 system/modules/dc-general/classes/src/ContaoCommunityAlliance/DcGeneral/Event/EventPropagator.php(120): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('dc-general.view...', Object(ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\ModelToLabelEvent))
#10 system/modules/dc-general/classes/src/ContaoCommunityAlliance/DcGeneral/Event/EventPropagator.php(72): ContaoCommunityAlliance\DcGeneral\Event\EventPropagator->dispatch('dc-general.view...', Object(ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\ModelToLabelEvent))
#11 system/modules/dc-general/classes/src/ContaoCommunityAlliance/DcGeneral/Contao/View/Contao2BackendView/BaseView.php(3059): ContaoCommunityAlliance\DcGeneral\Event\EventPropagator->propagate('dc-general.view...', Object(ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\ModelToLabelEvent), Array)
#12 system/modules/dc-general/classes/src/ContaoCommunityAlliance/DcGeneral/Contao/View/Contao2BackendView/ListView.php(180): ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\BaseView->formatModel(Object(MetaModels\DcGeneral\Data\Model))
#13 system/modules/dc-general/classes/src/ContaoCommunityAlliance/DcGeneral/Contao/View/Contao2BackendView/ListView.php(199): ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\ListView->setListViewLabel(Object(ContaoCommunityAlliance\DcGeneral\Data\DefaultCollection), Array)
#14 system/modules/dc-general/classes/src/ContaoCommunityAlliance/DcGeneral/Contao/View/Contao2BackendView/ListView.php(336): ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\ListView->viewList(Object(ContaoCommunityAlliance\DcGeneral\Data\DefaultCollection))
#15 [internal function]: ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\ListView->showAll()
#16 system/modules/dc-general/classes/src/ContaoCommunityAlliance/DcGeneral/Contao/View/Contao2BackendView/BaseView.php(162): call_user_func_array(Array, Array)
#17 [internal function]: ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\BaseView->handleAction(Object(ContaoCommunityAlliance\DcGeneral\Event\ActionEvent), 'dc-general.acti...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#18 system/modules/symfony-event-dispatcher/classes/Symfony/Component/EventDispatcher/EventDispatcher.php(164): call_user_func(Array, Object(ContaoCommunityAlliance\DcGeneral\Event\ActionEvent), 'dc-general.acti...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#19 system/modules/symfony-event-dispatcher/classes/Symfony/Component/EventDispatcher/EventDispatcher.php(53): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'dc-general.acti...', Object(ContaoCommunityAlliance\DcGeneral\Event\ActionEvent))
#20 system/modules/dc-general/classes/src/ContaoCommunityAlliance/DcGeneral/Event/EventPropagator.php(120): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('dc-general.acti...', Object(ContaoCommunityAlliance\DcGeneral\Event\ActionEvent))
#21 system/modules/dc-general/classes/src/ContaoCommunityAlliance/DcGeneral/Event/EventPropagator.php(72): ContaoCommunityAlliance\DcGeneral\Event\EventPropagator->dispatch('dc-general.acti...', Object(ContaoCommunityAlliance\DcGeneral\Event\ActionEvent))
#22 system/modules/dc-general/classes/src/ContaoCommunityAlliance/DcGeneral/Controller/DefaultController.php(120): ContaoCommunityAlliance\DcGeneral\Event\EventPropagator->propagate('dc-general.acti...', Object(ContaoCommunityAlliance\DcGeneral\Event\ActionEvent), Array)
#23 system/modules/metamodels/classes/src/MetaModels/BackendIntegration/Module.php(220): ContaoCommunityAlliance\DcGeneral\Controller\DefaultController->handle(Object(ContaoCommunityAlliance\DcGeneral\Action))
#24 system/modules/metamodels/classes/src/MetaModels/BackendIntegration/Module.php(242): MetaModels\BackendIntegration\Module->runDC()
#25 system/modules/metamodels/classes/src/MetaModels/BackendIntegration/Module.php(259): MetaModels\BackendIntegration\Module->performNormal()
#26 system/modules/core/classes/Backend.php(272): MetaModels\BackendIntegration\Module->generate()
#27 contao/main.php(136): Contao\Backend->getBackendModule('metamodel_mm_sv...')
#28 contao/main.php(287): Main->run()
#29 {main}
weiterer Test: die Datei im "Template-Root" habe ich zu "mm_attr_checkbox_567" umbenannt und in der BE Listenansicht ausgewählt - die funktioniert!
ergo: der Pfad über die Theme-Einstellungen werden anscheinend nicht gefunden bzw. sind falsch
bei der ajax.php von Andreas musste ich die Sache so anpassen (letzte Zeile)
// Get the page layout
$objLayout = $this->getPageLayout(version_compare(VERSION, '3.0', '>=') ? $objPage : $objPage->layout);
$objPage->template = strlen($objLayout->template) ? $objLayout->template : 'fe_page';
$objPage->templateGroup = version_compare(VERSION, '3.2', '>=') ? $objLayout->getRelated('pid')->templates : $objLayout->templates;
in NB 20.09.14 Bug noch vorhanden...
habe nochmal select und text getestet - der selbe Effekt! ist also ein generelles Problem
habe mir das in https://github.com/MetaModels/core/blob/tng/src/MetaModels/Render/Template.php#L299-L318 angesehen...
Für das BE gibt es einige "Fußangeln", die wohl eher von logischer Natur sind...
1.) $GLOBALS['objPage']->templateGroup gibt es nur für das FE, d.h. für die BE-Anzeige unbrauchbar - MM hat keinen direkten Bezug zu einer Seiten-Wurzel, d.h. auch nicht zu einem bestimmten Template(ordner)
2.) in der Auswahl nur die Templates aus den Template-Hauptordner zulassen wäre auch falsch, da die Listeneinstellung keine Ahnung hat, ob sie für FE, BE oder beides verwendet wird
3.) gibt es mehrere Themes mit einem eigenen Templateordner, wird das angepasste template nur von einem Ordner angezeigt => würde sagen das ist ein Bug...
Bestätigung: Mit den letzten Updates ist mir auch aufgefallen, dass die eigenen Templates trotz unveränderter Lage (gleiche DB, Files unter /templates/ vorhanden und im MM eingetragen) mit Fehler nicht gefunden werden!
Habe das hier eben noch mit @discordier besprochen. Unser Problem ist, MetaModels anders als Contao Module unabhängig von einem Theme ist, wenn wir aber alle templates inklusive Unterordnern ausgeben es (aktuell) passieren kann das die MetaModels Backend Listen kaputt gehen, da das Template nicht aufgelöst werden kann.
Da sich der Umstand nicht beheben lässt (contao core problem) würden wir folgendes integrieren:
Könntet ihr damit leben? @cogizz @cboelter
Jau passt!
dito!
ggf. auch kleiner Hinweis in dem Text unter dem Auswahlfeld...
...bei contao-bootstrap gibt es das gleiche Problem bei der Zuordnung eines Iconsets aus dem Theme zu einem Formular...
@discordier wie in mumble diskutiert listen wir bei mehrmaligem gleichen vorkommen alle auf und schreiben das entsprechende template dahinter mm_attr_checkbox_123 (test)
mm_attr_checkbox_123 (test2)
usw. https://github.com/MetaModels/core/issues/579#issuecomment-56509818
Ich habe es mir gerade mal angesehen, die Auswahl im Backend funktioniert richtig. Aber im Backend zum Beispiel knallt er immer noch komplett.
Fatal error: Uncaught exception Exception with message Could not find template "mm_attr_alias_custom" thrown in system/modules/core/library/Contao/TemplateLoader.php on line 127
#0 composer/vendor/metamodels/core/src/MetaModels/Render/Template.php(320): Contao\TemplateLoader::getPath('mm_attr_alias_c...', 'text')
#1 composer/vendor/metamodels/core/src/MetaModels/Render/Template.php(367): MetaModels\Render\Template->getTemplate('mm_attr_alias_c...', 'text', false)
#2 composer/vendor/metamodels/core/src/MetaModels/Attribute/Base.php(417): MetaModels\Render\Template->parse('text', false)
#3 composer/vendor/metamodels/core/src/MetaModels/Item.php(107): MetaModels\Attribute\Base->parseValue(Array, 'text', Object(MetaModels\Render\Setting\Simple))
#4 composer/vendor/metamodels/core/src/MetaModels/Item.php(545): MetaModels\Item->internalParseAttribute(Object(MetaModels\Attribute\Alias\Alias), 'text', Object(MetaModels\Render\Setting\Collection))
#5 composer/vendor/metamodels/core/src/MetaModels/DcGeneral/Events/MetaModel/RenderItem.php(139): MetaModels\Item->parseAttribute('alias', 'text', Object(MetaModels\Render\Setting\Collection))
#6 [internal function]: MetaModels\DcGeneral\Events\MetaModel\RenderItem::getReadableValue(Object(ContaoCommunityAlliance\DcGeneral\View\Event\RenderReadablePropertyValueEvent), 'dc-general.view...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#7 composer/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php(164): call_user_func(Array, Object(ContaoCommunityAlliance\DcGeneral\View\Event\RenderReadablePropertyValueEvent), 'dc-general.view...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#8 composer/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php(53): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'dc-general.view...', Object(ContaoCommunityAlliance\DcGeneral\View\Event\RenderReadablePropertyValueEvent))
#9 composer/vendor/contao-community-alliance/dc-general/src/ContaoCommunityAlliance/DcGeneral/Event/EventPropagator.php(119): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('dc-general.view...', Object(ContaoCommunityAlliance\DcGeneral\View\Event\RenderReadablePropertyValueEvent))
#10 composer/vendor/contao-community-alliance/dc-general/src/ContaoCommunityAlliance/DcGeneral/Contao/View/Contao2BackendView/BaseView.php(2299): ContaoCommunityAlliance\DcGeneral\Event\EventPropagator->dispatch('dc-general.view...', Object(ContaoCommunityAlliance\DcGeneral\View\Event\RenderReadablePropertyValueEvent))
#11 composer/vendor/contao-community-alliance/dc-general/src/ContaoCommunityAlliance/DcGeneral/Contao/View/Contao2BackendView/BaseView.php(2216): ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\BaseView->getReadableFieldValue(Object(ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\Properties\DefaultProperty), Object(MetaModels\DcGeneral\Data\Model), '')
#12 composer/vendor/contao-community-alliance/dc-general/src/ContaoCommunityAlliance/DcGeneral/Contao/View/Contao2BackendView/TreeView.php(440): ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\BaseView->formatModel(Object(MetaModels\DcGeneral\Data\Model))
#13 composer/vendor/contao-community-alliance/dc-general/src/ContaoCommunityAlliance/DcGeneral/Contao/View/Contao2BackendView/TreeView.php(501): ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\TreeView->parseModel(Object(MetaModels\DcGeneral\Data\Model), 'mm_configuratio...')
#14 composer/vendor/contao-community-alliance/dc-general/src/ContaoCommunityAlliance/DcGeneral/Contao/View/Contao2BackendView/TreeView.php(649): ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\TreeView->generateTreeView(Object(ContaoCommunityAlliance\DcGeneral\Data\DefaultCollection), 'tree_xtnd')
#15 composer/vendor/contao-community-alliance/dc-general/src/ContaoCommunityAlliance/DcGeneral/Contao/View/Contao2BackendView/TreeView.php(766): ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\TreeView->viewTree(Object(ContaoCommunityAlliance\DcGeneral\Data\DefaultCollection))
#16 [internal function]: ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\TreeView->showAll()
#17 composer/vendor/contao-community-alliance/dc-general/src/ContaoCommunityAlliance/DcGeneral/Contao/View/Contao2BackendView/BaseView.php(155): call_user_func_array(Array, Array)
#18 [internal function]: ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\BaseView->handleAction(Object(ContaoCommunityAlliance\DcGeneral\Event\ActionEvent), 'dc-general.acti...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#19 composer/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php(164): call_user_func(Array, Object(ContaoCommunityAlliance\DcGeneral\Event\ActionEvent), 'dc-general.acti...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#20 composer/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php(53): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'dc-general.acti...', Object(ContaoCommunityAlliance\DcGeneral\Event\ActionEvent))
#21 composer/vendor/contao-community-alliance/dc-general/src/ContaoCommunityAlliance/DcGeneral/Event/EventPropagator.php(119): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('dc-general.acti...', Object(ContaoCommunityAlliance\DcGeneral\Event\ActionEvent))
#22 composer/vendor/contao-community-alliance/dc-general/src/ContaoCommunityAlliance/DcGeneral/Controller/DefaultController.php(129): ContaoCommunityAlliance\DcGeneral\Event\EventPropagator->dispatch('dc-general.acti...', Object(ContaoCommunityAlliance\DcGeneral\Event\ActionEvent))
#23 composer/vendor/metamodels/core/src/MetaModels/BackendIntegration/Module.php(238): ContaoCommunityAlliance\DcGeneral\Controller\DefaultController->handle(Object(ContaoCommunityAlliance\DcGeneral\Action))
#24 composer/vendor/metamodels/core/src/MetaModels/BackendIntegration/Module.php(263): MetaModels\BackendIntegration\Module->runDC()
#25 composer/vendor/metamodels/core/src/MetaModels/BackendIntegration/Module.php(283): MetaModels\BackendIntegration\Module->performNormal()
#26 system/modules/core/classes/Backend.php(271): MetaModels\BackendIntegration\Module->generate()
#27 contao/main.php(142): Contao\Backend->getBackendModule('metamodel_mm_co...')
#28 contao/main.php(293): Main->run()
#29 {main}
@discordier Wollten wir die Error-Ausgabe nicht auch an den Debug-Modus oder eine eigene Checkbox hängen?
WIP by @cboelter
This issue has been labeled with "testing" but got no feedback.
We are reliant on feedback to prove a ticket fixed as we can not tell if the ticket has been resolved if we receive no feedback. I will close this ticket now, as I assume it has been resolved. If the ticket should still be valid, please feel free to reopen it.
@xantippe could you please have a final look at this and tell if your issue has been resolved?
I´ll do was ich machen kann...
@cboelter bist du hier noch an einem WIP dran, sonst schauen wir uns das mal an.
@tim-bec nope, könntet Ihr gerne übernehmen :)
aktueller Test: bei Auswahl eines Templates, weches in einem /template/unterordner sitzt, kommt in der Listenansicht
Template not found (it is maybe within a unreachable theme folder?).
also alles o.k. für mich
wenn ich ein eigens Template mm_attr_checkbox_be anlege und auswähle, kommt in der Listenansicht