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

Fix warnings if callbacks are not set #2561

Open
wants to merge 1 commit into
base: 2.9
Choose a base branch
from

Conversation

lukasbableck
Copy link

@lukasbableck lukasbableck commented Jan 16, 2025

I initially noticed this problem in AddressBook.php when editing an address in the frontend (see stacktrace below). I have also changed all other places where this problem could occur.

Stacktrace:

ErrorException:
Warning: Undefined array key "onsubmit_callback"

  at vendor/isotope/isotope-core/system/modules/isotope/library/Isotope/Module/AddressBook.php:240
  at Isotope\Module\AddressBook->edit('...')
     (vendor/isotope/isotope-core/system/modules/isotope/library/Isotope/Module/AddressBook.php:107)
  at Isotope\Module\AddressBook->compile()
     (vendor/contao/core-bundle/src/Resources/contao/modules/Module.php:214)
  at Contao\Module->generate()
     (vendor/codefog/contao-haste/library/Haste/Frontend/AbstractFrontendModule.php:52)
  at Haste\Frontend\AbstractFrontendModule->generate()
     (vendor/isotope/isotope-core/system/modules/isotope/library/Isotope/Module/Module.php:116)
  at Isotope\Module\Module->generate()
     (vendor/isotope/isotope-core/system/modules/isotope/library/Isotope/Module/AddressBook.php:79)
  at Isotope\Module\AddressBook->generate()
     (vendor/contao/core-bundle/src/Resources/contao/elements/ContentModule.php:98)
  at Contao\ContentModule->generate()
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:623)
  at Contao\Controller::getContentElement(object(ContentModel), 'main')
     (vendor/contao/core-bundle/src/Resources/contao/modules/ModuleArticle.php:197)
  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:70)
  at Contao\ModuleArticle->generate(false)
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:551)
  at Contao\Controller::getArticle(object(ArticleModel), false, false, 'main')
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:393)
  at Contao\Controller::getFrontendModule('0', 'main')
     (vendor/contao/core-bundle/src/Resources/contao/pages/PageRegular.php:194)
  at Contao\PageRegular->prepare(object(PageModel))
     (vendor/contao/core-bundle/src/Resources/contao/pages/PageRegular.php:61)
  at Contao\PageRegular->getResponse(object(PageModel), true)
     (vendor/contao/core-bundle/src/Resources/contao/controllers/FrontendIndex.php:320)
  at Contao\FrontendIndex->renderPage(object(PageModel))
     (vendor/symfony/http-kernel/HttpKernel.php:163)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:75)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (public/index.php:44)

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

Successfully merging this pull request may close these issues.

1 participant