When generating static files, we often encounter "the template file does not exist and cannot parse the file !" . Many of my friends have tried many ways in the Forum to solve some problems. Some people still have problems. Why? In fact, the problem is likely to be a variety of problems, but the results are the same, so the cause of the problem is hard to find. In this case, some documents are relatively confidential when they are collected into the database. If you have tried other methods, try the following methods. Dedecms5.6 tutorial-js200.cn
Turn: the solution is to locate the error where an error occurs!
Search for the string "the template file does not exist and the document cannot be parsed" in the include folder. Find the following five files:
Arc. Archives. Class. php
Arc. listview. Class. php
Arc. sglistview. Class. php
Arc. specview. Class. php
Arc. taglist. Class. php
Unable to parse the document because the template file does not exist!
If this error message is displayed on the document generation page, open the file "arc. Archives. Class. php" and find row 484th.
Modify the error code: Echo "the template file does not exist and cannot be parsed! "; Dedecms5.6 tutorial-js200.cn
Modify to: Echo "the template file does not exist and the document cannot be parsed! ". $ This-> arcid;
In this way, the ID of the first wrong article can be returned. So, when it is regenerated, I get the ID of this article, open this article and edit it, and find that this article does not set a category, it should be because no category is set during collection and warehouse receiving. The problem is solved after the document column is set!
Similarly, if this problem occurs when the column list is generated, you can modify line 168th of the file "arc. listview. Class. php. -Js200.cn
Echo "the template file does not exist and the document cannot be parsed! ";
Modify to: Echo "the template file does not exist and the document cannot be parsed !. $ Tempfile ";
In this way, you can know exactly which document or template file has an error when generating a static file!