Thread Rating:
  • 13 Vote(s) - 4.08 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] Thank You/Like System v3.3.7 + MyAlerts support
Great Plugin!

Is there a way to make it so when a person likes a post, the Like button turns into "liked button" while counting how many likes did the post get?
All this while disabling the "unlike" button. currently when I disable the like button, once a post is liked, the like button hides.
Reply
I don't think so. There's no way I know of to do this with the plugin's current code. You'd probably need to hack it to achieve this.
Reply
Good morning!

Since installation, this plug in has worked flawlessly (thank you!) until this morning.

For some reason, when you hover the cursor over the Like button, the cursor changes like it's an active button, but nothing happens when you click it.  If you right click and open in new tab/window, it successfully adds the like.

I did try to uninstall/install again, but it still isn't working correctly.

Any suggestions on what to try to get it going again?
Reply
Probably there is a Javascript error. Open up your browser's Java script console by pressing F12 and let us know what, if any, error messages you see.
Reply
(2020-09-23, 01:33 PM)Laird Wrote: Probably there is a Javascript error. Open up your browser's Java script console by pressing F12 and let us know what, if any, error messages you see.


Thank you for the reply!

I did as you asked and saw this:


GET https://www.beyond-the-fringe.com/css.ph...%5B0%5D=61 net::ERR_ABORTED 400

2DevTools failed to load SourceMap: Could not load content for chrome-extension://dgbldpiollgaehnlegmfhioconikkjjh/adblock/include.preload.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME

I disabled Javascript in my browser and the button now works as it should.

Any thought on what might be causing the problem?
Reply
(2020-09-23, 08:30 PM)Catch Wrote: GET https://www.beyond-the-fringe.com/css.ph...%5B0%5D=61 net::ERR_ABORTED 400

I don't think that this is related, but it is odd - it should be returning 200 not 400 - and you should probably look into it.

The 400 ("not found") error doesn't seem to be due to a missing css.php file, because loading that file without the query parameters does give the expected 200.

I suggest you check your error logs (both web server and PHP/MyBB).

(2020-09-23, 08:30 PM)Catch Wrote: I disabled Javascript in my browser and the button now works as it should.

Any thought on what might be causing the problem?

I created an account on your forum to investigate, but it looks like you've deactivated the plugin. If you'd be kind enough to reactivate it, I'll see if I can debug it for you.
Reply
Thank you for the reply!  We did reactive it just now, thank you for offering to look at it!  The Members are missing their Like button! lol

I never even thought to check the error log. I did just now and it's a mess!

Here is an excerpt from the top:


<error>
<dateline>1574914357</dateline>
<script></script>
<line>0</line>
<type>20</type>
<friendly_type>MyBB SQL Error</friendly_type>
<message>SQL Error: 1062 - Duplicate entry '81090-6' for key 'pid'
Query:
INSERT
INTO mybb_g33k_thankyoulike_thankyoulike (pid,uid,puid,dateline)
VALUES (81090,6,86,1574914357)
</message>
<back_trace>#0  errorHandler->log_error(20, SQL Error: 1062 - Duplicate entry '81090-6' for key 'pid'
Query:
INSERT
INTO mybb_g33k_thankyoulike_thankyoulike (pid,uid,puid,dateline)
VALUES (81090,6,86,1574914357)
, , 0) called at [/home/customer/www/beyond-the-fringe.com/public_html/inc/class_error.php:189]
#1  errorHandler->error(20, Array ([error_no] => 1062,[error] => Duplicate entry '81090-6' for key 'pid',[query] =>
INSERT
INTO mybb_g33k_thankyoulike_thankyoulike (pid,uid,puid,dateline)
VALUES (81090,6,86,1574914357)
)) called at [/home/customer/www/beyond-the-fringe.com/public_html/inc/db_mysqli.php:597]
#2  DB_MySQLi->error(
INSERT
INTO mybb_g33k_thankyoulike_thankyoulike (pid,uid,puid,dateline)
VALUES (81090,6,86,1574914357)
) called at [/home/customer/www/beyond-the-fringe.com/public_html/inc/db_mysqli.php:337]
#3  DB_MySQLi->query(
INSERT
INTO mybb_g33k_thankyoulike_thankyoulike (pid,uid,puid,dateline)
VALUES (81090,6,86,1574914357)
, 0, 1) called at [/home/customer/www/beyond-the-fringe.com/public_html/inc/db_mysqli.php:370]
#4  DB_MySQLi->write_query(
INSERT
INTO mybb_g33k_thankyoulike_thankyoulike (pid,uid,puid,dateline)
VALUES (81090,6,86,1574914357)
) called at [/home/customer/www/beyond-the-fringe.com/public_html/inc/db_mysqli.php:830]
#5  DB_MySQLi->insert_query(g33k_thankyoulike_thankyoulike, Array ([pid] => 81090,[uid] => 6,[puid] => 86,[dateline] => 1574914357)) called at [/home/customer/www/beyond-the-fringe.com/public_html/thankyoulike.php:241]
</back_trace>
</error>

Does that give you any clues?

Thank you in advance!
Reply
(2020-09-24, 11:38 PM)Catch Wrote: Thank you for the reply!  We did reactive it just now, thank you for offering to look at it!  The Members are missing their Like button! lol

I never even thought to check the error log. I did just now and it's a mess!

Here is an excerpt from the top:


<error>
<dateline>1574914357</dateline>
<script></script>
<line>0</line>
<type>20</type>
<friendly_type>MyBB SQL Error</friendly_type>
<message>SQL Error: 1062 - Duplicate entry '81090-6' for key 'pid'
Query:
INSERT
INTO mybb_g33k_thankyoulike_thankyoulike (pid,uid,puid,dateline)
VALUES (81090,6,86,1574914357)
</message>
<back_trace>#0  errorHandler->log_error(20, SQL Error: 1062 - Duplicate entry '81090-6' for key 'pid'
Query:
INSERT
INTO mybb_g33k_thankyoulike_thankyoulike (pid,uid,puid,dateline)
VALUES (81090,6,86,1574914357)
, , 0) called at [/home/customer/www/beyond-the-fringe.com/public_html/inc/class_error.php:189]
#1  errorHandler->error(20, Array ([error_no] => 1062,[error] => Duplicate entry '81090-6' for key 'pid',[query] =>
INSERT
INTO mybb_g33k_thankyoulike_thankyoulike (pid,uid,puid,dateline)
VALUES (81090,6,86,1574914357)
)) called at [/home/customer/www/beyond-the-fringe.com/public_html/inc/db_mysqli.php:597]
#2  DB_MySQLi->error(
INSERT
INTO mybb_g33k_thankyoulike_thankyoulike (pid,uid,puid,dateline)
VALUES (81090,6,86,1574914357)
) called at [/home/customer/www/beyond-the-fringe.com/public_html/inc/db_mysqli.php:337]
#3  DB_MySQLi->query(
INSERT
INTO mybb_g33k_thankyoulike_thankyoulike (pid,uid,puid,dateline)
VALUES (81090,6,86,1574914357)
, 0, 1) called at [/home/customer/www/beyond-the-fringe.com/public_html/inc/db_mysqli.php:370]
#4  DB_MySQLi->write_query(
INSERT
INTO mybb_g33k_thankyoulike_thankyoulike (pid,uid,puid,dateline)
VALUES (81090,6,86,1574914357)
) called at [/home/customer/www/beyond-the-fringe.com/public_html/inc/db_mysqli.php:830]
#5  DB_MySQLi->insert_query(g33k_thankyoulike_thankyoulike, Array ([pid] => 81090,[uid] => 6,[puid] => 86,[dateline] => 1574914357)) called at [/home/customer/www/beyond-the-fringe.com/public_html/thankyoulike.php:241]
</back_trace>
</error>

Does that give you any clues?

Thank you in advance!
Adding to what Catch said - we also upgraded to the latest version (TYL) - all files are freshly pasted and overwritten to the appropriate folders...
Thanks...
Reply
It looks as though a core setting which is required to be set to "Yes" for Javascript clicks on the add/remove like buttons to work is instead set to "No". That setting can be found in the ACP under "Server and Optimization Options" => "Enable XMLHttp request features?".

I expect (hope) that the problem will be solved if you toggle that setting back to "Yes". If not, we've got more debugging to do.

(2020-09-24, 11:38 PM)Catch Wrote: Does that give you any clues?

I don't think that those errors are related to the problem. I suspect that they occurred due to a scenario like this:

  1. User opens a thread page.
  2. User right clicks on the "like" button for a post and selects "Open in new tab". The new tab opens and the like is added.
  3. User repeats step two above, but this time when the plugin tries to add the like, it has already been added. The database server complains, and we get the errors you see.

(2020-09-24, 11:38 PM)Catch Wrote: Thank you in advance!

You're very welcome.
Reply
(2020-09-25, 12:07 AM)Laird Wrote: It looks as though a core setting which is required to be set to "Yes" for Javascript clicks on the add/remove like buttons to work is instead set to "No". That setting can be found in the ACP under "Server and Optimization Options" => "Enable XMLHttp request features?".

I expect (hope) that the problem will be solved if you toggle that setting back to "Yes". If not, we've got more debugging to do.

(2020-09-24, 11:38 PM)Catch Wrote: Does that give you any clues?

I don't think that those errors are related to the problem. I suspect that they occurred due to a scenario like this:

  1. User opens a thread page.
  2. User right clicks on the "like" button for a post and selects "Open in new tab". The new tab opens and the like is added.
  3. User repeats step two above, but this time when the plugin tries to add the like, it has already been added. The database server complains, and we get the errors you see.

(2020-09-24, 11:38 PM)Catch Wrote: Thank you in advance!

You're very welcome.

You're literally incredible!  I did as you suggested and all is well again in forum world lol.

I have no clue how that got disabled, but it's working perfectly again now. 

Thank you so much! Yell if there's ever anything I can do for you!
Reply


Forum Jump:


Users browsing this thread: bhuto, 3 Guest(s)