[SOLVED] CB Activity Error on update but no errors on page

3 weeks 9 hours ago #326488 by kdave321
Ah - yes, the installed files I checked had the latest code.

I was using Firefox (on Linux). I tried to manually upgrade the package from Chrome and got a slightly different error message:
SyntaxError: Unexpected token < in JSON at position 0

Please Log in to join the conversation.

3 weeks 9 hours ago #326490 by krileon
It likely means something is echoing to the Joomla buffer on every page and it's breaking the JSON response that the package installer is expecting. The good news is that's the last process of the install so it's done after the plugin installed. As for how to fix this the only way is to get rid of whatever is echoing to the buffer. It's typically a system plugin in Extensions > Plugins doing it.

You should be able to press F12 to open the browser developer tools then click the Network tab to review the HTTP requests made during install. This should let you preview the JSON response and see what's being included with the response to break the JSON format.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

3 weeks 8 hours ago #326491 by kdave321
OK, but I updated dozens of other things without an error. Why this one package? This actually gives me a "500 Internal Server Error" in the server log.

In the response code I see this
<title>Error: 1062 Duplicate entry &#039;852-activity.asset-&#039; for key &#039;asset&#039;</title>

Please Log in to join the conversation.

3 weeks 7 hours ago #326492 by krileon
Fatal SQL error. Looks like you have duplicate hidden entries in _comprofiler_plugin_activity_hidden database table. It's not supposed to be possible for someone to hide an activity entry twice, but it might have happened on some occasions. The index for that table was made unique to improve its query performance and is what is causing your issue.

Suggest checking the _comprofiler_plugin_activity_hidden table and removing any duplicate rows. The below query can help find the duplicates.
SELECT `user_id`, `type`, `asset`, GROUP_CONCAT( `id` ) AS ids, COUNT(*) AS total
 FROM `jos_comprofiler_plugin_activity_hidden`
 WHERE `asset` IS NOT NULL
 GROUP BY `user_id`, `type`, `asset`
 HAVING total > 1;

Replace jos_ with whatever your table prefix is. Will see if I can find a away to improve the install script to find and get rid of the duplicates for you.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

3 weeks 7 hours ago #326493 by kdave321
There is indeed multiple rows.
+---------+----------------+-------+-------+-------+
| user_id | type           | asset | ids   | total |
+---------+----------------+-------+-------+-------+
|     852 | activity.asset |       | 1,2,3 |     3 |
+---------+----------------+-------+-------+-------+

There are only 4 rows in that table total. It's my dev server and only I (852) am testing things.
+----+---------+----------------+--------+-------+
| id | user_id | type           | object | asset |
+----+---------+----------------+--------+-------+
|  1 |     852 | activity.asset |      0 |       |
|  2 |     852 | activity.asset |      0 |       |
|  3 |     852 | activity.asset |      0 |       |
|  4 |     852 | activity       |     82 |       |
+----+---------+----------------+--------+-------+

Need to identify how that's happening to prevent it in production.

Please Log in to join the conversation.

3 weeks 7 hours ago #326494 by krileon
Only the last row with an id of 4 is valid. 1-3 are all invalid. They're hiding a asset, but there is no asset specified. Given how their ids are 1-3 I'm guessing it was an old bug that could've caused that. Simply delete rows 1-3 and your issue should resolve.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.179 seconds

Facebook Twitter LinkedIn