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

Problem with /api/page?url=xxxx.html where templates are enabled #18

Open
Steffen-MLR opened this issue May 15, 2020 · 1 comment
Open

Comments

@Steffen-MLR
Copy link

hi,

i am trying to use your api, I installed it an the /api/sitemap does work.

When I try to browse to my.site.com/api/page?url=xxxx.html, I just get "an error occured" from contao. Log shows the following:
app.CRITICAL: An exception occurred. {"exception":"[object] (Exception(code: 0): Could not find template \"rsce_tao_centered_wrapper_start\" at (...)/vendor/contao/core-bundle/src/Resources/contao/library/Contao/TemplateLoader.php:153)"} []

So, what I thought, maybe the "rsce_tao_centered_wrapper_start"-Template is someway defect, so I uninstalled it and tried again.

this Time I got:
app.CRITICAL: An exception occurred. {"exception":"[object] (Exception(code: 0): Could not find template \"rsce_tao_boxes\" at (...)/vendor/contao/core-bundle/src/Resources/contao/library/Contao/TemplateLoader.php:153)"} []

This is the same error, with a different template. I cant remove all my Templates, I need them for the Website.

This got me thinking, is it possible to tell the api, that it should let all modules load before trying to get the content of the site? Is this a known error or do I just user the api in a wrong way?

What I want to achive is, to get the Content of the site xxxx.html as json via the api. Lokking forward for your reactions, stay safe!

@lautschrift
Copy link

I got the same error.
I could fix it, in my case, by inserting my templates into the Contao-Template root directory.

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