fnagel / beautyofcode

TYPO3 CMS Extension beautyofcode
https://extensions.typo3.org/extension/beautyofcode/
GNU General Public License v2.0
6 stars 8 forks source link

Issue when deleting page in TYPO3 8.3.x #14

Closed fnagel closed 7 years ago

fnagel commented 8 years ago

Dummy TCA mapping seems to cause issues when deleting a page, see: https://github.com/fnagel/beautyofcode/blob/master/ext_tables.php#L63-L76

Error:

array(4 items)
   caller => 'TYPO3\CMS\Core\Database\DatabaseConnection::exec_SELECTquery' (60 chars)
   ERROR => 'Table 'tx_beautyofcode_domain_model_flexform' doesn't exist' (71 chars)
   lastBuiltQuery => 'SELECT uid FROM tx_beautyofcode_domain_model_flexform WHERE pid=317' (67 chars)
   debug_backtrace => '{closure}#21 // TYPO3\CMS\Backend\Http\Application->run#20 // TYPO3\CMS\C
      ore\Core\Bootstrap->handleRequest#94 // TYPO3\CMS\Backend\Http\AjaxReques
      tHandler->handleRequest#302 // TYPO3\CMS\Backend\Http\AjaxRequestHandler-
      >dispatch#89 // TYPO3\CMS\Backend\Http\RouteDispatcher->dispatch#171 /
      / call_user_func_array#54 // TYPO3\CMS\Core\ExtDirect\ExtDirectRouter->ro
      uteAction# // TYPO3\CMS\Core\ExtDirect\ExtDirectRouter->processRpc#87 // 
      call_user_func_array#139 // TYPO3\CMS\Backend\Tree\Pagetree\ExtdirectTreeCom
      mands->deleteNode# // TYPO3\CMS\Backend\Tree\Pagetree\Commands::deleteNod
      e#86 // TYPO3\CMS\Backend\Tree\Pagetree\Commands::processTceCmdAndDataMap#87
       // TYPO3\CMS\Core\DataHandling\DataHandler->process_cmdmap#212 // TYPO3\
      CMS\Core\DataHandling\DataHandler->deleteAction#3353 // TYPO3\CMS\Version
      \Hook\DataHandlerHook->processCmdmap_deleteAction#4871 // TYPO3\CMS\Core\
      DataHandling\DataHandler->deleteEl#226 // TYPO3\CMS\Core\DataHandling\Dat
      aHandler->deletePages#4894 // TYPO3\CMS\Core\DataHandling\DataHandler->
      ;deleteSpecificPage#5126 // TYPO3\CMS\Core\Database\DatabaseConnection->e
      xec_SELECTquery#5157 // TYPO3\CMS\Core\Database\DatabaseConnection->debug
      #314' (1172 chars)

Needs some testing if those lines are still needed in older TYPO3 versions (speaking 7.3.1+).

This was added in https://github.com/fnagel/beautyofcode/commit/d3f4d8a741ee8523f845ade8e970d94d7de237b2

fnagel commented 8 years ago

@dreadwarrior Any suggestions or hints?

dreadwarrior commented 8 years ago

Hi Felix,

are there any error messages when deleting a page? I am still on a 7.x branch and will check if I am using this workaround in One of the next days.

Cheers, tommy

fnagel commented 7 years ago

Added error message to description. No time yet to check what's causing the actual issue.

fnagel commented 7 years ago

Error message in 8.4:

Exception
An exception occurred while executing 'SELECT `uid` FROM `tx_beautyofcode_domain_model_flexform` WHERE `pid` = 47':

Table 'typo3v8.tx_beautyofcode_domain_model_flexform' doesn't exist

Similar issue in TYPO3 7.6 too. No idea how we missed that one :-/

Mapping is needed, otherwise the flexform won't work in FE. Some check excluding BE context seems to do the trick! I will do some more testing...