[TH] Reactions [Deleted]

A couple of minor bugs/inconsistencies I've noticed.

When you click "show all" in the media gallery the phrase in the pop-up is missing
View attachment 173448

Click on the visitor menu on the forum index and the reactions appear without a separator (27 0 0); everywhere else I've checked on site they appear with a separator (27 | 0 | 0)
View attachment 173449

That's strange, I cannot reproduce either one of those problems on my site.
 
OK that's weird.

On Gemma's report above, I noticed that when I am in a thread and click the visitor menu the line separators are visible for me, when I am on the forum index the separators do not appear!
 
Some of my members who use Safari, can only react with a thumbs up" after the latest update.

win10 with Edge same problem as with Safari
 
Last edited:
Okay, so it's all users using those browsers? Will have a look

Edit: Have given it some tests locally with Safari (don't currently have access to Windows to test Edge, but will be able to test that as well shortly) -- haven't been able to replicate any issues, could you create a ticket so we can have a look at your site?
 
Getting Server error log.

Code:
XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry 'post-69371-109' for key 'content_type_id_like_user_id' src/XF/Db/AbstractStatement.php:212

Generated by: ছোটভাই Apr 18, 2018 at 11:25 PM

Stack trace

INSERT  INTO `xf_liked_content` (`content_type`, `content_id`, `like_user_id`, `content_user_id`, `is_counted`, `like_id`, `like_date`) VALUES (?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1062, '23000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1062, '23000')
#2 src/XF/Db/AbstractAdapter.php(79): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(160): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1389): XF\Db\AbstractAdapter->insert('xf_liked_conten...', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1121): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/XF/Repository/LikedContent.php(94): XF\Mvc\Entity\Entity->save()
#7 src/addons/ThemeHouse/Reactions/Entity/ReactedContent.php(143): XF\Repository\LikedContent->insertLike('post', 69371, Object(Datio\AllowedEmails\XF\Entity\User), false)
#8 src/addons/ThemeHouse/Reactions/Entity/ReactedContent.php(93): ThemeHouse\Reactions\Entity\ReactedContent->toggleLike()
#9 src/XF/Mvc/Entity/Entity.php(1145): ThemeHouse\Reactions\Entity\ReactedContent->_postSave()
#10 src/addons/ThemeHouse/Reactions/Repository/ReactedContent.php(101): XF\Mvc\Entity\Entity->save()
#11 src/addons/ThemeHouse/Reactions/ControllerPlugin/React.php(29): ThemeHouse\Reactions\Repository\ReactedContent->insertReact(Object(haydric\toRights\XF\Entity\Post), Object(ThemeHouse\Reactions\Entity\ReactedContent))
#12 src/addons/ThemeHouse/Reactions/Pub/Controller/React.php(27): ThemeHouse\Reactions\ControllerPlugin\React->actionToggleReact(Object(haydric\toRights\XF\Entity\Post), Object(ThemeHouse\Reactions\Entity\ReactedContent), 'insert')
#13 src/XF/Mvc/Dispatcher.php(249): ThemeHouse\Reactions\Pub\Controller\React->actionReact(Object(XF\Mvc\ParameterBag))
#14 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('ThemeHouse\\Reac...', 'React', 'json', Object(XF\Mvc\ParameterBag), 'reactions', Object(ThemeHouse\Reactions\Pub\Controller\React), NULL)
#15 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#16 src/XF/App.php(1891): XF\Mvc\Dispatcher->run()
#17 src/XF.php(328): XF\App->run()
#18 index.php(13): XF::runApp('XF\\Pub\\App')
#19 {main}

Request state

array(4) {
  ["url"] => string(29) "/reactions/react/post/69371/2"
  ["referrer"] => string(76) "/threads/what-is-hide-tag-and-how-to-use-in-post.4905/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(54) "/threads/what-is-hide-tag-and-how-to-use-in-post.4905/"
    ["_xfWithData"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
Getting Server error log.

Code:
XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry 'post-69371-109' for key 'content_type_id_like_user_id' src/XF/Db/AbstractStatement.php:212

Generated by: ছোটভাই Apr 18, 2018 at 11:25 PM

Stack trace

INSERT  INTO `xf_liked_content` (`content_type`, `content_id`, `like_user_id`, `content_user_id`, `is_counted`, `like_id`, `like_date`) VALUES (?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1062, '23000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1062, '23000')
#2 src/XF/Db/AbstractAdapter.php(79): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(160): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1389): XF\Db\AbstractAdapter->insert('xf_liked_conten...', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1121): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/XF/Repository/LikedContent.php(94): XF\Mvc\Entity\Entity->save()
#7 src/addons/ThemeHouse/Reactions/Entity/ReactedContent.php(143): XF\Repository\LikedContent->insertLike('post', 69371, Object(Datio\AllowedEmails\XF\Entity\User), false)
#8 src/addons/ThemeHouse/Reactions/Entity/ReactedContent.php(93): ThemeHouse\Reactions\Entity\ReactedContent->toggleLike()
#9 src/XF/Mvc/Entity/Entity.php(1145): ThemeHouse\Reactions\Entity\ReactedContent->_postSave()
#10 src/addons/ThemeHouse/Reactions/Repository/ReactedContent.php(101): XF\Mvc\Entity\Entity->save()
#11 src/addons/ThemeHouse/Reactions/ControllerPlugin/React.php(29): ThemeHouse\Reactions\Repository\ReactedContent->insertReact(Object(haydric\toRights\XF\Entity\Post), Object(ThemeHouse\Reactions\Entity\ReactedContent))
#12 src/addons/ThemeHouse/Reactions/Pub/Controller/React.php(27): ThemeHouse\Reactions\ControllerPlugin\React->actionToggleReact(Object(haydric\toRights\XF\Entity\Post), Object(ThemeHouse\Reactions\Entity\ReactedContent), 'insert')
#13 src/XF/Mvc/Dispatcher.php(249): ThemeHouse\Reactions\Pub\Controller\React->actionReact(Object(XF\Mvc\ParameterBag))
#14 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('ThemeHouse\\Reac...', 'React', 'json', Object(XF\Mvc\ParameterBag), 'reactions', Object(ThemeHouse\Reactions\Pub\Controller\React), NULL)
#15 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#16 src/XF/App.php(1891): XF\Mvc\Dispatcher->run()
#17 src/XF.php(328): XF\App->run()
#18 index.php(13): XF::runApp('XF\\Pub\\App')
#19 {main}

Request state

array(4) {
  ["url"] => string(29) "/reactions/react/post/69371/2"
  ["referrer"] => string(76) "/threads/what-is-hide-tag-and-how-to-use-in-post.4905/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(54) "/threads/what-is-hide-tag-and-how-to-use-in-post.4905/"
    ["_xfWithData"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}

I'm not 100% sure what could be causing this as it's something we explicitly checking for, so this happening really shouldn't even be possible:

PHP:
$existingLike = $likeRepo->getLikeByContentAndLiker($this->content_type, $this->content_id, $this->react_user_id);

if ($isCreate && !$existingLike && $this->Reactor instanceof \XF\Entity\User) {
    $likeRepo->insertLike($this->content_type, $this->content_id, $this->Reactor, false);
}

Are you able to replicate this if you try to use the "Like" reaction on that post (ID 69371)
 
Even if you are able to click the like button twice this wouldn't happen under normal circumstances as we have a check in place explicitly for an existing like already existing. If it's something that you've only seen once it's likely nothing to worry about, but if it is something that you have seen before there may be an issue somewhere
 
Also, why are the smilies different to the stock XF2 smilies? Wouldn't it make sense to have them consistent?

:ROFLMAO: vs
funny.svg
 
A couple of minor bugs/inconsistencies I've noticed.

When you click "show all" in the media gallery the phrase in the pop-up is missing
View attachment 173448

Click on the visitor menu on the forum index and the reactions appear without a separator (27 0 0); everywhere else I've checked on site they appear with a separator (27 | 0 | 0)
View attachment 173449
Thank you @Gemma for the report, I've gone ahead and reported these on our issue tracker! :)
 
is there any way to make a selection os the reactions anonymous?
How do you mean exactly? Like making them anonymous for different users, user groups?

Also, why are the smilies different to the stock XF2 smilies? Wouldn't it make sense to have them consistent?

:ROFLMAO: vs
funny.svg

Support for XF2 based smiles would be an idea, I'll add this as a feature suggestion on our issue tracker.
 
We desperately need a notifications toggle on this. Just nonstop alerts for our users for every reaction. It should be wrapped up in the "Likes" alter that is default in XF.
 
We desperately need a notifications toggle on this. Just nonstop alerts for our users for every reaction. It should be wrapped up in the "Likes" alter that is default in XF.
This is an idea, would you like this to be a toggle that can be enabled/disabled on every reaction that is active or? Just trying to get a better idea before adding it to our issue tracker :)
 
This is an idea, would you like this to be a toggle that can be enabled/disabled on every reaction that is active or? Just trying to get a better idea before adding it to our issue tracker :)
It should be a global like the "Likes" one is by default.

alerts.webp

So see the "Likes your message"? It should be disabling alerts for "Reactions" as well.

I see under the options you can have it disable the alert at all for the specific reaction but some users love seeing all the notifications and some do not so the user should be able to toggle that on an individual basis.
 
It should be a global like the "Likes" one is by default.

View attachment 173714

So see the "Likes your message"? It should be disabling alerts for "Reactions" as well.

I see under the options you can have it disable the alert at all for the specific reaction but some users love seeing all the notifications and some do not so the user should be able to toggle that on an individual basis.
I see your point now, what a grand idea! I'll go ahead and add this as a feature request on our issue tracker :)
 
Top Bottom