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

No view template found for custom viewtype in latest ez platform version #81

Closed
TFohrer opened this issue Jul 31, 2018 · 6 comments
Closed

Comments

@TFohrer
Copy link

TFohrer commented Jul 31, 2018

Hi Guys,

When using the site api (version 2.5.2 ) and the latest ez platform version (2.2.1) now I'm getting this error:

An exception has been thrown during the rendering of a template ("No view template was set to render the view with the 'module' view type. Check your view configuration.").

Although i have this config:

ezpublish:
    system:
        site_group:
            ngcontent_view:
                full:
                    scaya_default_pages:
                        template: :full:default_page.html.twig
                        match:
                            Identifier\ContentType: [scaya_pages_home, scaya_pages_detail]
                module:
                    youtube_video:
                        template: :modules:youtube-video.html.twig
                        match:
                            Identifier\ContentType: scaya_modules_youtube_video
                    detail_image_text:
                        template: :modules:detail-image-text.html.twig
                        match:
                            Identifier\ContentType: scaya_modules_detail_image_text 

That's the template part:

...
{{ render_esi(controller('ng_content:viewAction', {
            'contentId': module,
            'viewType': 'module',
            'params':{
                'blockPosition': loop.index,
                'isRoot': false,
                'parentContentType': content.contentInfo.contentTypeIdentifier
            }})) }}
...

The automatic rendering of the viewtype full works, only the rendering via controller inside a template is not working somehow.
Using the default content rendering via ez_content:viewAction and using content_view in the config works fine, but then i don't get the site api functions. Even tried to replace the ngcontent_view with content_view

Thanks in advance for your help

@TFohrer TFohrer closed this as completed Jul 31, 2018
@TFohrer
Copy link
Author

TFohrer commented Jul 31, 2018

Issue was a misconfiguration on my side and no problem with the site api

@niels-heinemann
Copy link

I think I've got a similar problem. Can you remember your fix?

@pspanja
Copy link
Member

pspanja commented Aug 27, 2019

@nielosz if using v3, make sure you use ngcontent_view and not content_view configuration, maybe that's the issue.

@niels-heinemann
Copy link

Okay, thx. Mine seems to be another (ez Platform community)

@pspanja
Copy link
Member

pspanja commented Aug 27, 2019

I meant about Site API version, 3.0.0 was released two days ago. Also, consider using https://github.com/netgen/media-site, you will get much more comprehensive package than with the plain community release.

@niels-heinemann
Copy link

Ah, okay. We're on 2.5. And never tried netgen. Maybe in the near future. Thanks a load.

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

3 participants