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

Error with selected member group #13

Closed
4 tasks done
zonky2 opened this issue Sep 7, 2017 · 3 comments
Closed
4 tasks done

Error with selected member group #13

zonky2 opened this issue Sep 7, 2017 · 3 comments
Assignees
Labels
Milestone

Comments

@zonky2
Copy link
Contributor

zonky2 commented Sep 7, 2017

Checklist before I submit this issue report

I confirm that:

My environment is:

(Please fill in the actual values from your environment)

Key Value Comments
PHP version:
Contao version: 3.5.28
MetaModels version: a15
Installation via composer: yes
Installed MetaModels packages: current FEE
DCG version: b39

Issue description

with selected member group and without login at FE:

Warning: Invalid argument supplied for foreach() in composer\vendor\metamodels\core\src\MetaModels\BackendIntegration\InputScreen\InputScreen.php on line 315
#0 composer\vendor\metamodels\core\src\MetaModels\BackendIntegration\InputScreen\InputScreen.php(315): __error(2, 'Invalid argumen...', 'C:\\Contao2Go\\ht...', 315, Array)
#1 composer\vendor\metamodels\core\src\MetaModels\BackendIntegration\InputScreen\InputScreen.php(114): MetaModels\BackendIntegration\InputScreen\InputScreen->transformConditions(NULL)
#2 composer\vendor\metamodels\core\src\MetaModels\Helper\ViewCombinations.php(546): MetaModels\BackendIntegration\InputScreen\InputScreen->__construct(Object(MetaModels\MetaModelsServiceContainer), NULL, NULL, NULL, NULL)
#3 composer\vendor\metamodels\core\src\MetaModels\Helper\ViewCombinations.php(609): MetaModels\Helper\ViewCombinations->buildInputScreen('mm_mitarbeiterl...')
#4 composer\vendor\metamodels\core\src\MetaModels\Helper\ViewCombinations.php(596): MetaModels\Helper\ViewCombinations->getInputScreenDetails('mm_mitarbeiterl...')
#5 composer\vendor\metamodels\core\src\MetaModels\DcGeneral\DefinitionBuilder\MetaModelDefinitionBuilder.php(68): MetaModels\Helper\ViewCombinations->getInputScreen('mm_mitarbeiterl...')
#6 composer\vendor\metamodels\core\src\MetaModels\DcGeneral\DefinitionBuilder\MetaModelDefinitionBuilderTrait.php(42): MetaModels\DcGeneral\DefinitionBuilder\MetaModelDefinitionBuilder->build(Object(MetaModels\DcGeneral\DataDefinition\MetaModelDataDefinition))
#7 [internal function]: MetaModels\DcGeneral\DefinitionBuilder\MetaModelDefinitionBuilder->handle(Object(ContaoCommunityAlliance\DcGeneral\Factory\Event\BuildDataDefinitionEvent), 'dc-general.fact...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#8 composer\vendor\symfony\event-dispatcher\EventDispatcher.php(184): call_user_func(Array, Object(ContaoCommunityAlliance\DcGeneral\Factory\Event\BuildDataDefinitionEvent), 'dc-general.fact...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#9 composer\vendor\symfony\event-dispatcher\EventDispatcher.php(46): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'dc-general.fact...', Object(ContaoCommunityAlliance\DcGeneral\Factory\Event\BuildDataDefinitionEvent))
#10 composer\vendor\contao-community-alliance\dc-general\src\ContaoCommunityAlliance\DcGeneral\Factory\DcGeneralFactory.php(389): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('dc-general.fact...', Object(ContaoCommunityAlliance\DcGeneral\Factory\Event\BuildDataDefinitionEvent))
#11 composer\vendor\contao-community-alliance\dc-general\src\ContaoCommunityAlliance\DcGeneral\Factory\DcGeneralFactory.php(335): ContaoCommunityAlliance\DcGeneral\Factory\DcGeneralFactory->createContainer()
#12 composer\vendor\contao-community-alliance\dc-general\src\ContaoCommunityAlliance\DcGeneral\Factory\DcGeneralFactory.php(297): ContaoCommunityAlliance\DcGeneral\Factory\DcGeneralFactory->createEnvironment()
#13 composer\vendor\contao-community-alliance\dc-general-contao-frontend\src\FrontendEditor.php(101): ContaoCommunityAlliance\DcGeneral\Factory\DcGeneralFactory->createDcGeneral()
#14 composer\vendor\contao-community-alliance\dc-general-contao-frontend\src\FrontendEditor.php(73): ContaoCommunityAlliance\DcGeneral\ContaoFrontend\FrontendEditor->createDcGeneral('mm_mitarbeiterl...')
#15 composer\vendor\metamodels\contao-frontend-editing\src\FrontendEditHybrid.php(64): ContaoCommunityAlliance\DcGeneral\ContaoFrontend\FrontendEditor->editFor('mm_mitarbeiterl...', 'create')
#16 system\modules\core\classes\Hybrid.php(239): MetaModels\Contao\FrontendEditing\FrontendEditHybrid->compile()
#17 composer\vendor\metamodels\core\src\MetaModels\FrontendIntegration\MetaModelHybrid.php(109): Contao\Hybrid->generate()
#18 system\modules\core\library\Contao\Controller.php(484): MetaModels\FrontendIntegration\MetaModelHybrid->generate()
#19 system\modules\core\modules\ModuleArticle.php(213): Contao\Controller::getContentElement(Object(Contao\ContentModel), 'main')
#20 system\modules\core\modules\Module.php(287): Contao\ModuleArticle->compile()
#21 system\modules\core\modules\ModuleArticle.php(67): Contao\Module->generate()
#22 system\modules\core\library\Contao\Controller.php(417): Contao\ModuleArticle->generate(false)
#23 system\modules\core\library\Contao\Controller.php(277): Contao\Controller::getArticle(Object(Contao\ArticleModel), false, false, 'main')
#24 system\modules\core\pages\PageRegular.php(133): Contao\Controller::getFrontendModule('0', 'main')
#25 system\modules\core\controllers\FrontendIndex.php(285): Contao\PageRegular->generate(Object(Contao\PageModel), true)
#26 index.php(20): Contao\FrontendIndex->run()
#27 {main}

Fatal error: Uncaught exception RuntimeException with message Could not retrieve MetaModel with id thrown in composer\vendor\metamodels\core\src\MetaModels\BackendIntegration\InputScreen\InputScreen.php on line 451
#0 composer\vendor\metamodels\core\src\MetaModels\BackendIntegration\InputScreen\InputScreen.php(227): MetaModels\BackendIntegration\InputScreen\InputScreen->getMetaModel()
#1 composer\vendor\metamodels\core\src\MetaModels\BackendIntegration\InputScreen\InputScreen.php(115): MetaModels\BackendIntegration\InputScreen\InputScreen->translateRows(NULL)
#2 composer\vendor\metamodels\core\src\MetaModels\Helper\ViewCombinations.php(546): MetaModels\BackendIntegration\InputScreen\InputScreen->__construct(Object(MetaModels\MetaModelsServiceContainer), NULL, NULL, NULL, NULL)
#3 composer\vendor\metamodels\core\src\MetaModels\Helper\ViewCombinations.php(609): MetaModels\Helper\ViewCombinations->buildInputScreen('mm_mitarbeiterl...')
#4 composer\vendor\metamodels\core\src\MetaModels\Helper\ViewCombinations.php(596): MetaModels\Helper\ViewCombinations->getInputScreenDetails('mm_mitarbeiterl...')
#5 composer\vendor\metamodels\core\src\MetaModels\DcGeneral\DefinitionBuilder\MetaModelDefinitionBuilder.php(68): MetaModels\Helper\ViewCombinations->getInputScreen('mm_mitarbeiterl...')
#6 composer\vendor\metamodels\core\src\MetaModels\DcGeneral\DefinitionBuilder\MetaModelDefinitionBuilderTrait.php(42): MetaModels\DcGeneral\DefinitionBuilder\MetaModelDefinitionBuilder->build(Object(MetaModels\DcGeneral\DataDefinition\MetaModelDataDefinition))
#7 [internal function]: MetaModels\DcGeneral\DefinitionBuilder\MetaModelDefinitionBuilder->handle(Object(ContaoCommunityAlliance\DcGeneral\Factory\Event\BuildDataDefinitionEvent), 'dc-general.fact...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#8 composer\vendor\symfony\event-dispatcher\EventDispatcher.php(184): call_user_func(Array, Object(ContaoCommunityAlliance\DcGeneral\Factory\Event\BuildDataDefinitionEvent), 'dc-general.fact...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#9 composer\vendor\symfony\event-dispatcher\EventDispatcher.php(46): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'dc-general.fact...', Object(ContaoCommunityAlliance\DcGeneral\Factory\Event\BuildDataDefinitionEvent))
#10 composer\vendor\contao-community-alliance\dc-general\src\ContaoCommunityAlliance\DcGeneral\Factory\DcGeneralFactory.php(389): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('dc-general.fact...', Object(ContaoCommunityAlliance\DcGeneral\Factory\Event\BuildDataDefinitionEvent))
#11 composer\vendor\contao-community-alliance\dc-general\src\ContaoCommunityAlliance\DcGeneral\Factory\DcGeneralFactory.php(335): ContaoCommunityAlliance\DcGeneral\Factory\DcGeneralFactory->createContainer()
#12 composer\vendor\contao-community-alliance\dc-general\src\ContaoCommunityAlliance\DcGeneral\Factory\DcGeneralFactory.php(297): ContaoCommunityAlliance\DcGeneral\Factory\DcGeneralFactory->createEnvironment()
#13 composer\vendor\contao-community-alliance\dc-general-contao-frontend\src\FrontendEditor.php(101): ContaoCommunityAlliance\DcGeneral\Factory\DcGeneralFactory->createDcGeneral()
#14 composer\vendor\contao-community-alliance\dc-general-contao-frontend\src\FrontendEditor.php(73): ContaoCommunityAlliance\DcGeneral\ContaoFrontend\FrontendEditor->createDcGeneral('mm_mitarbeiterl...')
#15 composer\vendor\metamodels\contao-frontend-editing\src\FrontendEditHybrid.php(64): ContaoCommunityAlliance\DcGeneral\ContaoFrontend\FrontendEditor->editFor('mm_mitarbeiterl...', 'create')
#16 system\modules\core\classes\Hybrid.php(239): MetaModels\Contao\FrontendEditing\FrontendEditHybrid->compile()
#17 composer\vendor\metamodels\core\src\MetaModels\FrontendIntegration\MetaModelHybrid.php(109): Contao\Hybrid->generate()
#18 system\modules\core\library\Contao\Controller.php(484): MetaModels\FrontendIntegration\MetaModelHybrid->generate()
#19 system\modules\core\modules\ModuleArticle.php(213): Contao\Controller::getContentElement(Object(Contao\ContentModel), 'main')
#20 system\modules\core\modules\Module.php(287): Contao\ModuleArticle->compile()
#21 system\modules\core\modules\ModuleArticle.php(67): Contao\Module->generate()
#22 system\modules\core\library\Contao\Controller.php(417): Contao\ModuleArticle->generate(false)
#23 system\modules\core\library\Contao\Controller.php(277): Contao\Controller::getArticle(Object(Contao\ArticleModel), false, false, 'main')
#24 system\modules\core\pages\PageRegular.php(133): Contao\Controller::getFrontendModule('0', 'main')
#25 system\modules\core\controllers\FrontendIndex.php(285): Contao\PageRegular->generate(Object(Contao\PageModel), true)
#26 index.php(20): Contao\FrontendIndex->run()
#27 {main}

if we logged in - works fine...

I try action but

  • delete not allow: "Action delete is not supported yet."
  • edit not allow:
Fatal error: Uncaught exception ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralRuntimeException with message DataContainer mm_mitarbeiterliste is not creatable thrown in composer\vendor\contao-community-alliance\dc-general-contao-frontend\src\View\ActionHandler\EditHandler.php on line 48
#0 composer\vendor\contao-community-alliance\dc-general\src\ContaoCommunityAlliance\DcGeneral\View\ActionHandler\AbstractHandler.php(54): ContaoCommunityAlliance\DcGeneral\ContaoFrontend\View\ActionHandler\EditHandler->process()
#1 system\modules\dc-general-contao-frontend\config\event_listeners.php(52): ContaoCommunityAlliance\DcGeneral\View\ActionHandler\AbstractHandler->handleEvent(Object(ContaoCommunityAlliance\DcGeneral\Event\ActionEvent))
#2 [internal function]: ContaoCommunityAlliance\Contao\EventDispatcher\EventDispatcherInitializer->{closure}(Object(ContaoCommunityAlliance\DcGeneral\Event\ActionEvent), 'dc-general.acti...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#3 composer\vendor\symfony\event-dispatcher\EventDispatcher.php(184): call_user_func(Object(Closure), Object(ContaoCommunityAlliance\DcGeneral\Event\ActionEvent), 'dc-general.acti...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#4 composer\vendor\symfony\event-dispatcher\EventDispatcher.php(46): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'dc-general.acti...', Object(ContaoCommunityAlliance\DcGeneral\Event\ActionEvent))
#5 composer\vendor\contao-community-alliance\dc-general-contao-frontend\src\FrontendEditor.php(78): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('dc-general.acti...', Object(ContaoCommunityAlliance\DcGeneral\Event\ActionEvent))
#6 composer\vendor\metamodels\contao-frontend-editing\src\FrontendEditHybrid.php(64): ContaoCommunityAlliance\DcGeneral\ContaoFrontend\FrontendEditor->editFor('mm_mitarbeiterl...', 'create')
#7 system\modules\core\classes\Hybrid.php(239): MetaModels\Contao\FrontendEditing\FrontendEditHybrid->compile()
#8 composer\vendor\metamodels\core\src\MetaModels\FrontendIntegration\MetaModelHybrid.php(109): Contao\Hybrid->generate()
#9 system\modules\core\library\Contao\Controller.php(484): MetaModels\FrontendIntegration\MetaModelHybrid->generate()
#10 system\modules\core\modules\ModuleArticle.php(213): Contao\Controller::getContentElement(Object(Contao\ContentModel), 'main')
#11 system\modules\core\modules\Module.php(287): Contao\ModuleArticle->compile()
#12 system\modules\core\modules\ModuleArticle.php(67): Contao\Module->generate()
#13 system\modules\core\library\Contao\Controller.php(417): Contao\ModuleArticle->generate(false)
#14 system\modules\core\library\Contao\Controller.php(277): Contao\Controller::getArticle(Object(Contao\ArticleModel), false, false, 'main')
#15 system\modules\core\pages\PageRegular.php(133): Contao\Controller::getFrontendModule('0', 'main')
#16 system\modules\core\controllers\FrontendIndex.php(285): Contao\PageRegular->generate(Object(Contao\PageModel), true)
#17 index.php(20): Contao\FrontendIndex->run()
#18 {main}
  • create not allow:
Fatal error: Uncaught exception ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralRuntimeException with message DataContainer mm_mitarbeiterliste is not creatable thrown in composer\vendor\contao-community-alliance\dc-general-contao-frontend\src\View\ActionHandler\CreateHandler.php on line 47
#0 composer\vendor\contao-community-alliance\dc-general\src\ContaoCommunityAlliance\DcGeneral\View\ActionHandler\AbstractHandler.php(54): ContaoCommunityAlliance\DcGeneral\ContaoFrontend\View\ActionHandler\CreateHandler->process()
#1 system\modules\dc-general-contao-frontend\config\event_listeners.php(52): ContaoCommunityAlliance\DcGeneral\View\ActionHandler\AbstractHandler->handleEvent(Object(ContaoCommunityAlliance\DcGeneral\Event\ActionEvent))
#2 [internal function]: ContaoCommunityAlliance\Contao\EventDispatcher\EventDispatcherInitializer->{closure}(Object(ContaoCommunityAlliance\DcGeneral\Event\ActionEvent), 'dc-general.acti...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#3 composer\vendor\symfony\event-dispatcher\EventDispatcher.php(184): call_user_func(Object(Closure), Object(ContaoCommunityAlliance\DcGeneral\Event\ActionEvent), 'dc-general.acti...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#4 composer\vendor\symfony\event-dispatcher\EventDispatcher.php(46): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'dc-general.acti...', Object(ContaoCommunityAlliance\DcGeneral\Event\ActionEvent))
#5 composer\vendor\contao-community-alliance\dc-general-contao-frontend\src\FrontendEditor.php(78): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('dc-general.acti...', Object(ContaoCommunityAlliance\DcGeneral\Event\ActionEvent))
#6 composer\vendor\metamodels\contao-frontend-editing\src\FrontendEditHybrid.php(64): ContaoCommunityAlliance\DcGeneral\ContaoFrontend\FrontendEditor->editFor('mm_mitarbeiterl...', 'create')
#7 system\modules\core\classes\Hybrid.php(239): MetaModels\Contao\FrontendEditing\FrontendEditHybrid->compile()
#8 composer\vendor\metamodels\core\src\MetaModels\FrontendIntegration\MetaModelHybrid.php(109): Contao\Hybrid->generate()
#9 system\modules\core\library\Contao\Controller.php(484): MetaModels\FrontendIntegration\MetaModelHybrid->generate()
#10 system\modules\core\modules\ModuleArticle.php(213): Contao\Controller::getContentElement(Object(Contao\ContentModel), 'main')
#11 system\modules\core\modules\Module.php(287): Contao\ModuleArticle->compile()
#12 system\modules\core\modules\ModuleArticle.php(67): Contao\Module->generate()
#13 system\modules\core\library\Contao\Controller.php(417): Contao\ModuleArticle->generate(false)
#14 system\modules\core\library\Contao\Controller.php(277): Contao\Controller::getArticle(Object(Contao\ArticleModel), false, false, 'main')
#15 system\modules\core\pages\PageRegular.php(133): Contao\Controller::getFrontendModule('0', 'main')
#16 system\modules\core\controllers\FrontendIndex.php(285): Contao\PageRegular->generate(Object(Contao\PageModel), true)
#17 index.php(20): Contao\FrontendIndex->run()
#18 {main}

is edit or create not allow, the links at listing should hide

@zonky2 zonky2 changed the title Errorwith selected member group Error with selected member group Sep 7, 2017
@zonky2 zonky2 added the bug label Sep 7, 2017
@zonky2 zonky2 added this to the 2.0.0 milestone Sep 12, 2017
@zonky2 zonky2 modified the milestones: 2.0.0, 2.2.0 Jan 13, 2020
@zonky2 zonky2 assigned baumannsven and unassigned richardhj May 17, 2021
@zonky2
Copy link
Contributor Author

zonky2 commented May 18, 2021

Checked at current MM 2.2:

Edit 2022-01-25

  • member without login: hide CE
  • not allow to create: Error page 403
  • not allow to edit: Error page 403
  • not allow to delete: Error page 403
ContaoCommunityAlliance\DcGeneral\Exception\NotDeletableException:
Not able to perform delete action for data definition "DataContainer mm_fee_testcase is not deletable".

  at vendor/contao-community-alliance/dc-general-contao-frontend/src/View/ActionHandler/DeleteHandler.php:110
  at ContaoCommunityAlliance\DcGeneral\ContaoFrontend\View\ActionHandler\DeleteHandler->process()
     (vendor/contao-community-alliance/dc-general-contao-frontend/src/View/ActionHandler/DeleteHandler.php:91)
  at ContaoCommunityAlliance\DcGeneral\ContaoFrontend\View\ActionHandler\DeleteHandler->handleEvent()
     (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:126)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
     (vendor/symfony/event-dispatcher/EventDispatcher.php:264)
  at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch()
     (vendor/symfony/event-dispatcher/EventDispatcher.php:239)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (vendor/symfony/event-dispatcher/EventDispatcher.php:73)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:168)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
     (vendor/contao-community-alliance/dc-general-contao-frontend/src/FrontendEditor.php:92)
  at ContaoCommunityAlliance\DcGeneral\ContaoFrontend\FrontendEditor->editFor()
     (vendor/metamodels/contao-frontend-editing/src/FrontendEditHybrid.php:94)
  at MetaModels\ContaoFrontendEditingBundle\FrontendEditHybrid->compile()
     (vendor/contao/core-bundle/src/Resources/contao/classes/Hybrid.php:232)
  at Contao\Hybrid->generate()
     (vendor/metamodels/core/src/FrontendIntegration/MetaModelHybrid.php:236)
  at MetaModels\FrontendIntegration\MetaModelHybrid->generate()
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:575)
  at Contao\Controller::getContentElement()
     (vendor/contao/core-bundle/src/Resources/contao/modules/ModuleArticle.php:218)
  at Contao\ModuleArticle->compile()
     (vendor/contao/core-bundle/src/Resources/contao/modules/Module.php:214)
  at Contao\Module->generate()
     (vendor/contao/core-bundle/src/Resources/contao/modules/ModuleArticle.php:71)
  at Contao\ModuleArticle->generate()
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:515)
  at Contao\Controller::getArticle()
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:377)
  at Contao\Controller::getFrontendModule()
     (vendor/contao/core-bundle/src/Resources/contao/pages/PageRegular.php:168)
  at Contao\PageRegular->prepare()
     (vendor/contao/core-bundle/src/Resources/contao/pages/PageRegular.php:48)
  at Contao\PageRegular->getResponse()
     (vendor/contao/core-bundle/src/Resources/contao/controllers/FrontendIndex.php:339)
  at Contao\FrontendIndex->renderPage()
     (vendor/symfony/http-kernel/HttpKernel.php:158)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:80)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:201)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (web/preview.php:33)

@zonky2
Copy link
Contributor Author

zonky2 commented May 19, 2021

@baumannsven for delete check

$this->Template->editor = $this->editor->editFor($metaModel, 'create');
- should also call AccessDeniedException

@zonky2
Copy link
Contributor Author

zonky2 commented Jan 25, 2022

Fixed in MM 2.2

@zonky2 zonky2 closed this as completed Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants