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

Rendering is empty when PLUGIN_TYPE_CONTENT_ELEMENT is used #19

Closed
oliverklee opened this issue Jun 23, 2016 · 4 comments
Closed

Rendering is empty when PLUGIN_TYPE_CONTENT_ELEMENT is used #19

oliverklee opened this issue Jun 23, 2016 · 4 comments

Comments

@oliverklee
Copy link
Sponsor Contributor

This issue is a spin-off from PR #18.

When registering a plugin using \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin with $pluginType = \TYPO3\CMS\Extbase\Utility\ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT (instead of the default type PLUGIN_TYPE_PLUGIN), the output is completely empty. (The corresponding action also never gets called.)

We most probably will be able to test this using the ajax_example extension (although I haven't checked yet).

From my debugging, I found out that PLUGIN_TYPE_PLUGIN creates a TS setup structure like tt_content.list.20.pluginname = USER while PLUGIN_TYPE_CONTENT_ELEMENT does not create it, but the typoscript_rendering extension relies on this when rendering the content element.

@helhum
Copy link
Owner

helhum commented Jun 23, 2016

From my debugging, I found out that PLUGIN_TYPE_PLUGIN creates a TS setup structure like tt_content.list.20.pluginname = USER while PLUGIN_TYPE_CONTENT_ELEMENT does not create it

From reading the code, it creates a structure with tt_content.list.20.pluginname = COA
If it wouldn't the plugin wouldn't show anything in frontend rendering.

Can you please verify if the content element works at all?

And can you please paste the generated Ajax URI here?

@oliverklee
Copy link
Sponsor Contributor Author

oliverklee commented Jun 23, 2016

For both plugin types, the FE content elements works and displays its content. The plugin needs to be set in the content element in different ways, though:

PLUGIN_TYPE_CONTENT_ELEMENT:

  • General > Content Element > Type: Forms > (the name of the plugin)

  • Generated AJAX URL in my case:

    community/?tx_typoscriptrendering%5Bcontext%5D=%7B%22record%22%3A%22tt_content_5472%22%2C%22path%22%3A%22tt_content.list.20.ppwsicommunity_communitymaincontent%22%7D&tx_ppwsicommunity_communitymaincontent%5Baction%5D=create&tx_ppwsicommunity_communitymaincontent%5Bcontroller%5D=Thread&cHash=cedbdca3b0604d75cf6f904505b88434

PLUGIN_TYPE_PLUGIN:

  • General > Content Element > Type: Special > Insert Plugin

  • Plugin > Selected Plugin: (the name of the plugin)

  • Generated AJAX URL in my case:

    community/?tx_typoscriptrendering%5Bcontext%5D=%7B%22record%22%3A%22tt_content_5472%22%2C%22path%22%3A%22tt_content.list.20.ppwsicommunity_communitymaincontent%22%7D&tx_ppwsicommunity_communitymaincontent%5Baction%5D=create&tx_ppwsicommunity_communitymaincontent%5Bcontroller%5D=Thread&cHash=cedbdca3b0604d75cf6f904505b88434

(So the URLs are the same in both cases.)

@helhum helhum closed this as completed in a7dd7d8 Jun 24, 2016
@helhum
Copy link
Owner

helhum commented Jun 24, 2016

Was a bit tougher to fix than expected. Should work now however.

Thanks for the report!

@oliverklee
Copy link
Sponsor Contributor Author

Thanks! ❤️

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

No branches or pull requests

2 participants