rapila / cms-base

The rapila cms’ internals. Please file all issues here if they’re not directly related to a plugin or the sample site.
http://www.rapi.la
3 stars 1 forks source link

Template identfier parse error #200

Closed juergmessmer closed 9 years ago

juergmessmer commented 9 years ago

Error in ResourceIncluder->findResourceTypeForLocation(): no resource type found for add_newsletter_part.png;template=location_only}}

Logging extension and location in ResourceIncluder::findResourceTypeForLocation() vor der exception results in: extension => 'png;template=location_only}}', location => 'add_newsletter_part.png;template=location_only}}'

Path of include: site/web/images/admin/add_newsletter_part.png

File where included: site/config/config.yml newsletter: text_module: insertable_parts: [{icon: "{{writeDirectInclude=admin/add_newsletter_part.png;template=location_only}}"

sabberworm commented 9 years ago

Try testing what happens when you use this in a regular template instead of inside a config file. =

juergmessmer commented 9 years ago

No problem!

sabberworm commented 9 years ago

Then it might also be a spyc parsing error. Can you try outputting the whole template from the backtrace?

juergmessmer commented 9 years ago

I logged $this->aSettings['newsletter']['text_module']['insertable_parts'] in Settings::__construct and it looks ok?! screen shot 2014-12-02 at 10 59 42

sabberworm commented 9 years ago

There seems to be a space or something between the semicolon and the word template

juergmessmer commented 9 years ago

That was just testing, with space, with semicolon at the end, etc, but it made no difference.

juergmessmer commented 9 years ago

Where/when are the settings parsed?

sabberworm commented 9 years ago

This is not a bug.

sabberworm commented 9 years ago

See https://github.com/rapila/cms-base/blob/master/modules/widget/rich_text/RichTextWidgetModule.php#L139

There should not be a template identifier in the settings, only a location.

juergmessmer commented 9 years ago

Ah, ok. Thanks! icon: 'admin/add_newsletter_part.png' Yes that works. I was mislead because it was mentioned everywhere, in plugin config comments etc.