Skybluesofa Page list plus error
Permalink 1 user found helpful
Hi
I'm using the great Page list plus add-on for several projects. It works fine but today I saw an error while editing the Page List Plus block. It shows:
So I've started investigating it and find that on line no 92-93 of block.php it has
If I change the $vo object to $c it solves the problem.
But I'm not sure whether its a good practice as it is a core function and I know it shouldn't be changed. But it just solves the problem.
Also I've checked the Page List Plus blocks controller.php to find out exactly where the problem occurs. And find that the function called getScrollTopPosition() caused the problem. Here is the code marked as (***) caused the problem, which calls the function getByID();
So guys what will be the best solution for this? Shall I change the core function or just comment that line on controller.php
Please help me.
Rony
I'm using the great Page list plus add-on for several projects. It works fine but today I saw an error while editing the Page List Plus block. It shows:
Fatal error: Call to a member function getVersionID() on a non-object in /home/gilcommu/public_html/concrete/core/models/block.php on line 93
So I've started investigating it and find that on line no 92-93 of block.php it has
$vo = $c->getVersionObject(); $cvID = $vo->getVersionID();
If I change the $vo object to $c it solves the problem.
$vo = $c->getVersionObject(); $cvID = $c->getVersionID();
But I'm not sure whether its a good practice as it is a core function and I know it shouldn't be changed. But it just solves the problem.
Also I've checked the Page List Plus blocks controller.php to find out exactly where the problem occurs. And find that the function called getScrollTopPosition() caused the problem. Here is the code marked as (***) caused the problem, which calls the function getByID();
if (!$a->isGlobalArea()) { ***$b = Block::getByID($_REQUEST['bID'], $c, $a); } else { $b = Block::getByID($_REQUEST['bID'], Stack::getByName($_REQUEST['arHandle']), STACKS_AREA_NAME); if (is_a($b,'Block')) { $b->setBlockAreaObject($a); // set the original area object if ($_REQUEST['btask'] != 'view_edit_mode') { $addSpace = true; } } }
So guys what will be the best solution for this? Shall I change the core function or just comment that line on controller.php
Please help me.
Rony
Rony