Hi,
The error log is showing new errors which I have not been able to resolve.
Could someone advise what could be causing these errors.
Hi,
The error log is showing new errors which I have not been able to resolve.
Could someone advise what could be causing these errors.
ow_pluginfilesow_userfiles,ow_static,ow_smarty/template_c
If not, please do and refresh your website. If that does not help, please enable dev mode and refresh your website again.
If it does not help, please PM me your admin and FTP access details, I'll take a look at the issue. Keep us updated.
All sub-folders and files have to be set 777 permissions for the directories you mentioned above?
I'm asking because ow_pluginfiles for instance appears to contain enormous number of files.
Please confirm.
I hope what I did was correct?
I don't know if you were already aware of the cause of this error, but having done some testing I discovered that the error occurs when a non-signed-in user/guest tries to flag content. An error pops up on screen "parsererror". That's when the error appears in the error logs.
I have followed this post; https://docs.oxwall.org/faq:parse-error-troubleshooting to try to troubleshoot the error using Firefox.
This is what was returned in the console preceding the uncaught exception: parsererror:-
<style> .ow_debug_cont{padding:15px 0;width:80%;margin:0 auto;} .ow_debug_body{background:#fff;border:4px double;padding:5px;} .ow_debug_cap{font:bold 13px Tahoma;color:#fff;padding:5px;border:1px solid #000;width:250px;margin-top:-20px;} .ow_debug_body .notice{background:#fdf403;color:#555;} .ow_debug_body .warning{background:#f8b423;color:#555;} .ow_debug_body .error{background:#c10505;color:#fff;} .ow_debug_body .exception{background:#093dd3;color:#fff;} .ow_debug_body .vardump{background:#333;color:#fff;} .vardumper .string{color:green} .vardumper .null{color:blue} .vardumper .array{color:blue} .vardumper .bool{color:blue} .vardumper .property{color:brown} .vardumper .number{color:red} .vardumper .class{color:black;} .vardumper .class_prop{color:brown;} </style> <div class="ow_debug_cont"> <div class="ow_debug_body"> <div class="ow_debug_cap exception">OW Debug - Exception</div> <table> <tr> <td class="lbl">Message:</td> <td class="cnt">Unable to load template file '/home/itserecom/public_html/pro/ow_system_plugins/base/views/controllers/flag_flag.html'</td> </tr> <tr> <td class="lbl">File:</td> <td class="cnt">/home/itserecom/public_html/pro/ow_libraries/smarty3/sysplugins/smarty_internal_templatebase.php</td> </tr> <tr> <td class="lbl">Line:</td> <td class="cnt">127</td> </tr> <tr> <td class="lbl">Trace:</td> <td class="cnt"><pre>#0 /home/itserecom/public_html/pro/ow_core/view_renderer.php(101): Smarty_Internal_TemplateBase->fetch('/home/itserecom...') #1 /home/itserecom/public_html/pro/ow_core/renderable.php(271): OW_ViewRenderer->renderTemplate('/home/itserecom...') #2 /home/itserecom/public_html/pro/ow_core/request_handler.php(274): OW_Renderable->render() #3 /home/itserecom/public_html/pro/ow_core/application.php(329): OW_RequestHandler->dispatch() #4 /home/itserecom/public_html/pro/index.php(73): OW_Application->handleRequest() #5 {main}</pre></td> </tr> <tr> <td class="lbl">Type:</td> <td class="cnt" style="color:red;">SmartyException</td> </tr> </table> </div> </div>
Not sure how useful this is to you but to me it isn't.
Hope you can suggest a workable solution to this issue.
Thanks.
$flagButton = $value->getUserId() != OW::getUser()->getId();
with:
$flagButton = OW::getUser()->isAuthenticated() && $value->getUserId() != OW::getUser()->getId();
Thanks for your input, but sorry to disappoint you, the workaround that you suggested didn't work. I continue to get parsererror.
Any other suggestions?
I don't know what are the original intensions for this functionality Oxwall Devs have (to make it hidden for guests, that will require making changes in a lot of places or to allow flagging when not logged in), so at the moment for a quick fix you can edit \ow_system_plugins\base\controllers\flag.php file changing these lines:
if ( !OW::getUser()->isAuthenticated() )
{
return;
}
with:
if ( !OW::getUser()->isAuthenticated() )
{
exit(json_encode(array(
'result' => 'success',
'js' => 'OW.error("Sorry, guests are not allowed to flag. Please log-in to proceed.")'
)));
}
if you want to disable it for guests. Or just delete or comment this block so they can actually flag.