Jump to content

Can't create new templates


Lars
 Share

Recommended Posts

Hi,

Got a problem here. When I use the back-end and try to create a new template I end up on this page: "/processwire/setup/template/add".

The page starts with an error-block saying: "Unknown Selector operator: '=!' -- was your selector value properly escaped?" and the rest of the page is empty. No new templates for me.... Well, not true, I work around it by copying some existing template and rename it so I am not stuck, still this is an annoyance.

I have not installed any new modules after this error started to occur so I doubt it can be from a module (not that I know if any module is involved in creating a new template). The only module I have modified is "MarkupBlog". Restored the code on that one, but did not help.

Anyone had this problem before?

Link to comment
Share on other sites

Thanks Horst, your tip for turning on Debug solved my problem. I did not know there was a Debug setting.

Debug gave me an extensive list instead of the short error message.

The problem came from having one file in the template directory named "!tmp.php".

Just a scrap file I used as clipboard for bits and pieces, named with a leading "!" so that it would sort at top of the file list in my editor.

Now, the "!" in the file name was the culprit. Naming or renaming any PHP file in the /template/ directory with a leading "!" will re-create the problem.

Lesson of the day: Do not use leading "!" in template file names.

Thanks everyone helping out in his forum.

Process Wire is just amazing. 

  • Like 2
Link to comment
Share on other sites

......Debug solved my problem. I did not know there was a Debug setting.

Debug gave me an extensive list instead of the short error message.....

Remember to switch off debug mode before going live (on a remote server). Debug 'true' should never be used on a remote server...for security reasons...

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...