Hello folks,
after we updated SMF to 2.0.14, our Wiki (https://www.simplemachines.org/community/index.php?topic=272676.0) has an error by doing the first call: https://www.linuxmintusers.de/index.php?action=wiki
The error is:
Invalid value inserted or no type specified.
We are not able to uninstall the update, because we have to edit some core files, to probably run SMF after update to 2.0.14. This was no good update for us....
I will send the wiki with as a zip folder, which have the wiki-Source ( a few files) in it.
I try to search for the error, but I don't find, what reports the error: Invalid value inserted or no type specified.
I ask for help, because we need the wiki back!!!!
Many Thanks
Regards
neo67
You have to redo this changes in the mysqli part of that file
<file name="$sourcedir/Subs-Db-mysql.php">
<operation>
<search position="replace"><![CDATA[strpos($db_string, '{db_prefix}') !== false]]></search>
<add><![CDATA[strpos($db_string, '{db_prefix}') !== false || strpos($db_string, '{wiki_prefix}') !== false]]></add>
</operation>
<operation>
<search position="after"><![CDATA[
if (!isset($matches[2]))]]></search>
<add><![CDATA[
if ($matches[1] === 'wiki_prefix')
return $GLOBALS['wiki_prefix'];
]]></add>
</operation>
<operation>
<search position="before"><![CDATA[global $db_connection, $db_prefix;
$table = str_replace('{db_prefix}', $db_prefix, $table);]]></search>
<add><![CDATA[
if (isset($GLOBALS['wiki_prefix']))
$table = str_replace('{wiki_prefix}', $GLOBALS['wiki_prefix'], $table);
]]></add>
</operation>
<operation>
<search position="before"><![CDATA[ // Replace the prefix holder with the actual prefix.
$table = str_replace('{db_prefix}', $db_prefix, $table);]]></search>
<add><![CDATA[
if (isset($GLOBALS['wiki_prefix']))
$table = str_replace('{wiki_prefix}', $GLOBALS['wiki_prefix'], $table);
]]></add>
</operation>
</file>
Hello vbgamer45,
in which file I must redo changes?
Subs-Db-mysql.php?
Edit:
as a example:
This line (301)in Subs_Db-mysql.php I have to change from:
if (empty($db_values['security_override']) && (!empty($db_values) || strpos($db_string, '{db_prefix}') !== false || strpos($db_string, '{wiki_prefix}') !== false))
into:
if (empty($db_values['security_override']) && (!empty($db_values) || strpos($db_string, '{db_prefix}') !== false
???
and so one...
THX
Edit:
Oh my god... I dont know, what to do with the other lines...
are you able to clean the file?
Here is the original live file.
THANKS!
updated file attached
@vbgamer45
Thanks a lot. It's running again!
:) :) :) :) :) :) :) :) :) :) :)
greetz
neo67
8)
Glad to help.