"Edit Areas" tab of Content Areas plugin appears blank with some templates

Tags: #<Tag:0x00007ff5df0dec60>


just recently, I’ve set up a phpList installation and have found the Content Areas (CA) plugin to be a good solution to simplify e-mail editing for my colleagues who are not used to html (many thanks, @duncanc). For simple testing I’ve inserted the data-edit and data-type tags into a simple html document and the edit fields work like a charm.

With certain templates though, the plugin doesn’t render the edit page at all. This for example happens with the wonderful Cerberus hybrid template. Here CA displays a few error warnings:

The template has some html errors. Level Error, line 530, column 210: Tag webversion invalid Level Error, line 536, column 68: Tag unsubscribe invalid

I don’t think that those errors actually cause CA to display a blank screen, though, as a customized version of the hybrid template doesn’t throw any error warnings.

Is there any feature in the hybrid template that might cause this issue? Any thoughts or advice on this would be appreciated.

Cheers, hatchsklappspaten

@hatchsklappspaten I’m not sure why the template has those two elements - webversion and unsubscribe. They are not valid HTML elements. A browser would probably handle them but the plugin uses the php DOM extension which accepts only valid HTML elements.

Just change those two elements to be a div.

1 Like

True, this is a strange element. Yet changing this sadly hasn’t resolved the issue. I had deleted the invalid elements in my customization anyway, which is why I did not consider this to cause this particular issue.

For now the issue looks like this:

Is there any way to troubleshoot errors by logging?

@hatchsklappspaten The code is failing when trying to add an element into the template html for editing. I will need to look into what the problem actually is.

1 Like

@hatchsklappspaten There is an html comment between the head and body elements, which the plugin code is not expecting and makes it fail.

You can work around this by either removing it or moving it to be after the start of the body. The tab then shows the template

I will look a code change tomorrow.

1 Like

Wonderful, that works! Thank you.

@hatchsklappspaten There is a new release of the plugin that fixes the problem identified by your template. You can upgrade the plugin on the Manage Plugins page.