MyBB Community Forums

Full Version: Plugin issue - History log
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

i recently installed the plugin Edit History Log. After activating, if i go on the history log and click on the "compare" option, i get this error:

"Fatal error: require_once() [function.require]: Failed opening required '/home/a2044248/public_html/forum/inc/3rdparty/diff/Diff/Renderer/Inline.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/a2044248/public_html/forum/edithistory.php on line 98"

Here is line 82 till 101Sadred marked= 98)
----------------------------------------------------------------------------------------------------------------------------
if(!$editlog['eid'])
{
error($lang->error_no_log);
}

if($editlog['pid'] != $pid)
{
error($lang->error_cannot_compare_other_posts);
}

$lang->edit_history = $lang->sprintf($lang->edit_history, $post['subject']);
$dateline = my_date($mybb->settings['dateformat'], $editlog['dateline']).", ".my_date($mybb->settings['timeformat'], $editlog['dateline']);
$lang->edit_as_of = $lang->sprintf($lang->edit_as_of, $dateline);

require_once MYBB_ROOT."inc/3rdparty/diff/Diff.php";
require_once MYBB_ROOT."inc/3rdparty/diff/Diff/Renderer.php";
require_once MYBB_ROOT."inc/3rdparty/diff/Diff/Renderer/Inline.php";

$message1 = explode("\n", $editlog['originaltext']);
$message2 = explode("\n", $post['message']);
----------------------------------------------------------------------------------------------------------------------------
have you checked if Inline.php file exists at inc/3rdparty/diff/Diff/Renderer/
if it exists, observe how it is spelled - first letter capital or not. if it starts with a small letter
then change Inline.php to inline.php in the plugin file, save and check if it works.
I checked, it exists and the first letter is not capital.

So its: /forum/inc/3rdparty/diff/Diff/Renderer/inline.php
^ in the plugin file, change Inline.php to inline.php, save, and check if it works
That fixed it.

But another error appeared:

Fatal error: Class 'Horde_Text_Diff' not found in /home/a2044248/public_html/forum/edithistory.php on line 103

Here is line 100 till 115: (red marked=103)

$message1 = explode("\n", $editlog['originaltext']);
$message2 = explode("\n", $post['message']);

$diff = new Horde_Text_Diff('auto', array($message1, $message2));
$renderer = new Horde_Text_Diff_Renderer_Inline();

if($editlog['originaltext'] == $post['message'])
{
$comparison = $lang->post_same;
}
else
{
$comparison = $renderer->render($diff);
}

$post['message'] = htmlspecialchars_uni($post['message']);
try changing
$diff = new Horde_Text_Diff('auto', array($message1, $message2));
$renderer = new Horde_Text_Diff_Renderer_Inline();
to below
$diff = new Text_Diff('auto', array($message1, $message2));
$renderer = new Text_Diff_Renderer_Inline();
Fixed. Many thanks!

Always reliable Wink