You guys rock. I changed the debug setting, and now the error message reads:
“Fatal error: Namespace declaration statement has to be the very first statement in the script in … system/ee/EllisLab/ExpressionEngine/Controller/Publish/Comments.php on line 10”
So, line 10 reads currently:
“namespace EllisLab\ExpressionEngine\Controller\Publish;”
How should I change it? I apologize for my ignorance.
Here is the opening:
<?php
/**
* ExpressionEngine (https://expressionengine.com)
*
* @link https://expressionengine.com/
* @copyright Copyright (c) 2003-2017, EllisLab, Inc. (https://ellislab.com)
* @license https://expressionengine.com/license
*/
namespace EllisLab\ExpressionEngine\Controller\Publish;
use EllisLab\ExpressionEngine\Library\CP\Table;
use EllisLab\ExpressionEngine\Controller\Publish\AbstractPublish as AbstractPublishController;
use EllisLab\ExpressionEngine\Service\Model\Query\Builder;
/**
* Publish/Comments Controller
*/
class Comments extends AbstractPublishController {
public function __construct()
{
parent::__construct();
if ( ! ee()->cp->allowed_group_any(
'can_moderate_comments',
'can_edit_own_comments',
'can_delete_own_comments',
'can_edit_all_comments',
'can_delete_all_comments'
))
{
show_error(lang('unauthorized_access'), 403);
}
}
Thanks Joseph! I edited your post to fix that for you, your code wasn’t in a code fence (see the “Use Markdown” link for formatting tips).
That looks correct though, and doesn’t match the PHP compilation error you’re getting. What application did you use to modify the file? Might be an invisible control character perhaps.
I would start by just restoring those files from your download—refresh, make sure it still works (working in this case will be the original Spam module error). Then open the files in a plain text editor (Atom for instance), and apply the changes I referenced directly to the files that you can be sure have integrity.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.