By Sylvain ROGER on Tuesday, 26 January 2016
Posted in General
Replies 12
Likes 0
Views 602
Votes 0
Hi,

I just noticed that some ajax calls were failing due to an undefined index line 484 in includes/stream/template.php

privacyData might not be set for actor_id, which leads to php warning that results in malformed json responses in third extensions.
Hi Sylvain,

Please assign your domain to your license to obtain for support. You can do so by accessing your license area at http://stackideas.com/dashboard

Once you are done, update us here and we'll continue checking your issue.

Regards,
Zue
Zue
·
Tuesday, 26 January 2016 19:16
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Zue,

Done!
·
Tuesday, 26 January 2016 22:34
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Sylvain,

Hm, how were you able to reproduce these errors? Is this error only occurring on your custom app? I tried logging into your site but can't reproduce this error.
·
Wednesday, 27 January 2016 12:57
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

Thank you for your support.

I re-enabled our EasySocial stream plugin.

You can reproduce the issue using demo/demo account and when submitting a review on a recipe.

You can try this at http://demo.yoorecipe.com

I enclosed our plugin.

Regards,
Sylvain.
·
Thursday, 28 January 2016 16:31
·
0 Likes
·
0 Votes
·
0 Comments
·
Re: error occurs in ajax response, you can place a breakpoint or watch the error in web browser console (xhr requests)

Regards,
Sylvain
·
Thursday, 28 January 2016 16:32
·
0 Likes
·
0 Votes
·
0 Comments
·
1. Logged in as demo / demo
2. Posted a review at http://demo.yoorecipe.com/search-recipes/recipe/14.html
3. Ajax Response, http://screencast.com/t/MWtvaghms
·
Thursday, 28 January 2016 21:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark.

Weird. I enabled Komento plugin and get this error:

"<br />↵<b>Notice</b>: Undefined index: core in <b>/home/yoorecipe/sd/demo/www/administrator/components/com_easysocial/includes/stream/template.php</b> on line <b>484</b><br />↵<br />↵<b>Notice</b>: Trying to get property of non-object in <b>/home/yoorecipe/sd/demo/www/administrator/components/com_easysocial/includes/stream/template.php</b> on line <b>528</b><br />↵<br />↵<b>Notice</b>: Trying to get property of non-object in <b>/home/yoorecipe/sd/demo/www/administrator/components/com_easysocial/includes/stream/template.php</b> on line <b>529</b><br />↵{"status":true}"

komento plugin code:
<code>/**
* onReviewCreate
*/
public function onReviewCreate($context, &$recipe, &$review) {

$stream = Foundry::stream();
$template = $stream->getTemplate();

$my = Foundry::user();

$author_link = '<a href="'.JRoute::_('index.php?option=com_easysocial&view=profile&id='.$my->id.':'.$my->getName()).'">'.$my->getName().'</a>';
$recipe_link = '<a href="'.JRoute::_(JHtmlYooRecipeHelperRoute::getRecipeRoute($recipe->id.':'.$recipe->alias)).'">'.$recipe->title.'</a>';

$template->setActor($my->id ,'user');
$template->setContext($review->id, 'reviews.create');
$template->setVerb('create');
$template->setTitle(JText::sprintf('PLG_YOORECIPE_KOMENTO_USER_CREATED_REVIEW', $author_link, $recipe_link));
$template->setDate( JFactory::getDate()->toSql());

$stream->add($template);

Komento::commentify( 'com_yoorecipe', $review, array( 'params' => '') );
}</code>
·
Friday, 29 January 2016 19:27
·
0 Likes
·
0 Votes
·
0 Comments
·
I think you should also try to add this before the ->add

·
Saturday, 30 January 2016 14:42
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you Mark.

I just checked http://stackideas.com/docs/easysocial/developers/stream/creating-a-stream and setAccess is not documented yet.

We also create streams on other user actions. So, should I follow a special naming convention to set access in stream? like setAccess(%controller_name%.privacy.view)?

Regards,
Sylvain
·
Sunday, 31 January 2016 15:19
·
0 Likes
·
0 Votes
·
0 Comments
·
Those are actually depending on what privacy rules you have for your app actually but I would advise you take a look at our existing app like EasyBlog
·
Sunday, 31 January 2016 17:01
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Mark. I will!

regards,
Sylvain
·
Monday, 01 February 2016 21:09
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome
·
Monday, 01 February 2016 21:15
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post