The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Strange parse error
Does anyone have any idea what might be causing the following error?
Vers. 4.2.3 Parse error: syntax error, unexpected '<' in /home/xxxxxxxx/public_html/vb4/includes/class_core.php(4715) : eval()'d code on line 1 It happens every now and the. When doing something in the forum the whole page will suddenly go blank and be filled with many lines of the above. |
#2
|
|||
|
|||
It's caused by one of your templates which has an invalid expression or tag in it.
When it happens again, look at the template it uses and search in the template for any weird things related to "<". |
Благодарность от: | ||
Max Taxable |
#3
|
|||
|
|||
OK, but how do I know what template to look at?
|
#4
|
|||
|
|||
What are you doing on your site when it happens? Also a link to your site so when we check we can tell you what template it is if an account is needed then please create a test account for us
|
#5
|
|||
|
|||
Quote:
You could sit there on the site all day and chances are you'd never see it. Most of the times it's happened to me is when I'm viewing who's online then go back to the main forum. I'm not sure how you would determine the template because, when it happens the entire screen fills with line like the one I have in my first post. Nothing else at all. A simple refresh of the web page and it disappears. I've been disabling plugins one by one trying to see which one could be the culprit but the problem happens so infrequently that you can never be sure if it's fixed or not so the process is a very long one. |
#6
|
||||
|
||||
As already pointed out, that part of the code in class_core.php is rendering a template. Have you tried using a totally default style on your site and seeing if you still get the same error?
|
#7
|
|||
|
|||
Quote:
It is a totally default style, I have never used any other than the default. I am also turning off the plugins one by one to see if one of those is causing it. I understand it could be a template I simply don't know how to determine what template. |
#8
|
|||
|
|||
Quote:
I haven't tried this at all myself, but you might try editing file includes/class_core.php and (temporarily) changing the lines around line 4715 like this (the red parts are added): Code:
if (strpos($template_code, '$final_rendered') !== false) { ob_start(); eval($template_code); if (($error = ob_get_clean()) !== '') { echo $error; echo "\nTemplate '{$this->template}'\n\n"; var_dump(debug_backtrace()); } } else and maybe 'die' after the backtrace if you don't want a bunch of them. Again that would be temporary of course because you normally wouldn't want to be doing all that for every template. If you want to try it and you aren't used to doing things like that, I'd suggest that you copy class_core.php to another name before changing it, that way if you run in to problems you can just copy it back. |
#9
|
||||
|
||||
Login to your vB Admincp and click on "Settings>Options" on the side menu, then go to "General Settings" in the drop down and choose it. Now scroll down and find "Add Template Name in HTML Comments" tick "Yes" and then scroll down and save the settings. This will render the template name when you view the source of the site. Go to your site on the thread/page/posts/pm where ever this is happening and then right click anywhere in the browser screen on the page and choose "View Source". Now when you view the source you will see what templates are called in the code. The templates called are in green in the source view. This should help you narrow down the problem.
Also if you have a straggler "<" out there it will usually show all the time and be somewhere weird or look weird. But sometimes you do not always see it if you have a custom skin, it will disappear from time to time. This was a simple template coding error and can happen when a mod installs code into templates (if the developer does not check their code) or when you or someone else modifies the templates and makes a coding error. Basically you are looking for code that would look similar to this in the template. This is JUST an example NOT the code you need to search for: Code:
<<a href="http://mysite.com">My Site.com</a> Code:
<a href="http://mysite.com">My Site.com</a> |
#10
|
|||
|
|||
Quote:
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|