We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

New errors appearing | Forum

fouad
fouad Mar 14 '15

Hi,


The error log is showing new errors which I have not been able to resolve.


[Fri Mar 13 18:23:32 2015] [ow_core_log] [Exception] Message: Unable to load template file '/home/itserecom/public_html/pro/ow_system_plugins/base/views/controllers/flag_flag.html' File: /home/itserecom/public_html/pro/ow_libraries/smarty3/sysplugins/smarty_internal_templatebase.php Line:127 Trace: [#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}]


Could someone advise what could be causing these errors.

Nickolay
Nickolay Mar 14 '15
Just wait for the next Oxwall release. I've already reported this bug, that is causing errors you mentioned: http://www.oxwall.org/forum/topic/32291
ross Team
ross Mar 15 '15
Fouad, make sure you have set permissions 777 recursively for the following folders:

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. 

fouad
fouad Mar 19 '15
Ross,


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.

fouad
fouad Mar 19 '15
please ignore the above message because I was looking at ow_plugins instead
fouad
fouad Mar 19 '15
OK. Set 777 permissions recursively for the mentioned folders including every single folder and file and this included images and js files!


I hope what I did was correct?

ross Team
ross Mar 19 '15
Check if the error appear in the error log again after setting the right permissions. Keep us updated. 
fouad
fouad Mar 20 '15
Ross,


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.


Nickolay
Nickolay Mar 20 '15
Actually I pointed out the problem you're discussing in the first reply of this thread (just follow the link). You can fix it yourself in \ow_system_plugins\base\components\comments_list.php BASE_CMP_CommentsList::itemHandler() by replacing: 


$flagButton = $value->getUserId() != OW::getUser()->getId();


with:


$flagButton = OW::getUser()->isAuthenticated() && $value->getUserId() != OW::getUser()->getId();



fouad
fouad Mar 20 '15
Nicholay,


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?

Nickolay
Nickolay Mar 20 '15
You are right partly, it's even more global bug than I initially thought - beacouse I only noticed it in comments (so the solution was for those), but it seems there're a lot of other places where guests see Flag action, but are not really allowed to do it.

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.

The Forum post is edited by Nickolay Mar 20 '15
fouad
fouad Mar 21 '15
Thanks for your help, I'll be trying it out.
ross Team
ross Mar 22 '15
Yes, we are aware of this issue, it's been reported to our developers. It will be fixed asap.