0

I just have been noticed by Google Search Console that there are two pages with Soft 404 errors. So I cannot be sure when the error appeared first.

When calling the URL I get a blank page with the error:

Parse error: syntax error, unexpected '/' in /var/www/…/system/ee/legacy/libraries/Functions.php(627) : eval()'d code on line 27

The strange thing is that only 2 (of about 1.500 pages with the same template) are concerned - the other ones work correct. As far as I can see in those pages there is nothing special (like php-code or using snippets).

When I close the entry I get a 404; when I reopen it the error appears again.

Already tried to clear caches (EE-caches as well as local browser-caches).

Anyone with any idea about this? Thanks in advance!

Edit 17/03/2019

As @jelle-dijkstra suggested I tried to recreate the entry. Something strange happens: 1) I delete the old entry. 2) I create a new one (just with blablabla-text). The new one is visible in the frontend without errors (URL like template/group/entryid or also template/group/urltitle/entryid) 3) I change the entry-id in the database (via phpmyadmin in the tables exp_channel_data and exp_channel_titles). If I set it to the "old" entry-id I get the error in the frontend; if I set it to any other entry-id (like 9999) the entry is shown correctly in the frontend.

Also strange is that in the last two days 3 new Soft-404-errors for new entries occurred.

Any idea?!?

2
  • maybe you could post your template? – Jelle Dijkstra Mar 12 '19 at 16:14
  • It's rather big with some partials and variables; so I am not sure that this is helpful, especially because 1.500 pages with the same template are running smoothly. What do you mean? – BNetz Mar 13 '19 at 18:07
0

it might be something in those entries. maybe a strange symbol in the content, or a filename. you can also try to recreate those entries

3
  • I tried what you suggested and noticed very strange events. I updated my initial post. Do you have any idea how I could investigate further?! – BNetz Mar 17 '19 at 12:19
  • 1
    I wouldn't recommend changing ID's in the DB as there might be references to those ID's in other tables. I'd try a few other things: reduce the template to the bare minimum and step by step add functionality. Check for addon's that might be interfering, check your hosting if something changed in the setup (automatic updates from cpanel have bitten me some times) – Jelle Dijkstra Mar 18 '19 at 8:08
  • You are absolutely right about the topic of changing ids in the DB directly! I did the changes in a cloned installation, certainly. I will try to debug the template by reducing it in my clone installation, that's a good idea. (I thought that would not be possible due to the fact that I cannot reproduce the error systematically, but as I have an installation which produces the error I could try this there). – BNetz Mar 19 '19 at 3:40
0

I could identify the problem: The plugin Rating from EEHarbor was the reason, because statistics where out of count. I had to recount the statistics via the CP, then everything was ok.

Problem in detail: Somehow the {overall_sum}-variable was not calculated right from the plugin, it did not return a number but null. In my rating-embed-template I had some php-code with something like

$avg = ({overall_sum}/{overall_count});

As overall_sum was null the operation returned nothing which explains the error "unexpected '/' ", as we had nothing/number … $avg = /17 instead of number/number $avg = 4/17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.