News:

SMF 2.1.2 has been released! Take it for a spin! Read more.

Main Menu

"Array to string conversion" error in SMF 2.1.2

Started by Tascio, August 03, 2022, 12:51:45 PM

Previous topic - Next topic

Tascio

"Array to string conversion" error in SMF 2.1.2.

I keep getting this error in my logs, it seems to happen a great deal and is generating a lot of entries.

Any ideas on how to fix it?

Type of error

General

Error message

2: Array to string conversion

File
/home/[Username]/public_html/[My URL].co.uk/Themes/default/index.template.php

Line
138

URL of page causing the error
https://[My URL].co.uk/index.php?


Backtrace information

#0: smf_error_handler()
Called from /home/[Username]/public_html/[My URL].co.uk/Themes/default/index.template.php on line 138

#1: template_html_above()
Called from /home/[Username]/public_html/[My URL].co.uk/Sources/Load.php on line 2747

#2: loadSubTemplate()
Called from /home/[Username]/public_html/[My URL].co.uk/Sources/Subs.php on line 4543

#3: template_header()
Called from /home/[Username]/public_html/[My URL].co.uk/Sources/Subs.php on line 4150

#4: obExit()
Called from /home/[Username]/public_html/[My URL].co.uk/index.php on line 194

Kindred

mods installed?

What are lines 130-140 of your index.template.php?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Tascio

This actually started before I had any mods installed, but the only mod I am currently using is "Optimus"   (2.10.5 [12.04.22])

Lines 130-140 of index.template.php are:

130:
131: // Content related meta tags, like description, keywords, Open Graph stuff, etc...
132: foreach ($context['meta_tags'] as $meta_tag)
133: {
134: echo '
135: <meta';
136:
137: foreach ($meta_tag as $meta_key => $meta_value)
==>138: echo ' ', $meta_key, '="', $meta_value, '"';
139:
140: echo '>';

Kindred

and, in index.php?action=admin;area=featuresettings;sa=basic --
what do you have set for Meta keywords associated with forum
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

I'm wondering if Optimus is setting something that it shouldn't - it certainly expands out the meta properties, not just that one.

Tascio

Quote from: Kindred on August 03, 2022, 05:00:10 PMand, in index.php?action=admin;area=featuresettings;sa=basic --
what do you have set for Meta keywords associated with forum

I don't have a field on this page for meta tags? Does Optimus change it?

Kindred

Could be..  what did you set for metakeywords in optimus?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Tascio

It looks like this actually was something to do with meta tags and/or Optimus as I spent some time messing around with the Optimus settings and the error seems to have stopped.

Thank you all for your help!

I have another unrelated error with this particular forum, should I post about it here in this thread or should I start a new one? It is problem logging in to the admin area.

Arantor

Best to start a new thread unless it's *directly* related which this doesn't sound like.

Advertisement: