[TYPO3-dev] Persisted Model values are not saved anywhere

Dirk Ho dirk_studivz at web.de
Sun Jul 6 17:37:58 CEST 2014


Hi Anja and Ivano,

sorry for my late reponse, but I was trying around with your hints and 
googleing,... But only with little success:

The category entries are now stored inside a SysFolder, after I adjusted 
my Configuration/TypoScript/constants.txt file to this:

"plugin.tx_forum {
         view {
                 # cat=plugin.tx_forum/file; type=string; label=Path to 
template$
                 templateRootPath = EXT:forum/Resources/Private/Templates/
                 # cat=plugin.tx_forum/file; type=string; label=Path to 
template$
                 partialRootPath = EXT:forum/Resources/Private/Partials/
                 # cat=plugin.tx_forum/file; type=string; label=Path to 
template$
                 layoutRootPath = EXT:forum/Resources/Private/Layouts/
         }
         persistence {
                 # cat=plugin.tx_forum//a; type=string; label=Default 
storage PID
                 storagePid = 362
         }
}
module.tx_forum {
         persistence {
                 # cat=module.tx_yourextname//a; type=string; 
label=Default stor$
                 storagePid = 362
         }
}
"

I also adjusted my CategoryController to have a addAction and a 
listAction. The addAction works so far, but the listAction, which is 
called when I call the frontend page with my plugin raises the following 
exception:

"Oops, an error occurred!
Found an invalid element type declaration in %s. A type "''" does not exist.
More information regarding this error might be available online."

It makes no difference, if the listAction looks like
     public function listAction() {
         $this->view->assign('categories', 'BLA');
     }
or like
     public function listAction() {
         $categories = $this->categoryRepository->findAll();
         $this->view->assign('categories', $categories);
     }

The template looks like

<ul>
<!--f:for each="{categories}" as="cat"-->
  <li>{categories}</li>
<!--/f:for-->
</ul>

<f:link.action action="add" class="btn">Create Category</f:link.action>
(depending if I assign the categories object collection or the string 
the for each loop is commented or not).

Do you have any ideas? I tried to debug with xdebug, but this 
infrastructure does currently not run on my system. :(

Thanks and best wishes,

Dirk


Am 02.07.2014 08:53, schrieb Ivano Luberti:
> In your ext you should have a file called
>
> Configuration\TypoScript\constants.txt
>
> In it:
>
> plugin.tx_yourextname {
>      persistence {
>          # cat=plugin.tx_yourextname//a; type=string; label=Default
> storage PID
>          storagePid =
>      }
> }
>
> module.tx_aycodemanager {
>      }
>      persistence {
>          # cat=module.tx_yourextname//a; type=string; label=Default
> storage PID
>          storagePid =
>      }
> }
>
>
> Plugin is for your frontend pages, module is for your backend module.
>
> In the sotragePid paramter put the id of the storage folder you want to
> store your data to
>
> If you don't have one or both of them maybe you have not defined either
> the plugin or the module in Extension Builder
>




More information about the TYPO3-dev mailing list