PHPfox-Official / phpfox-v4-issues

phpFox Public Bug Tracker
https://phpfox.com
30 stars 21 forks source link

Comments App Thread Display #3009

Closed kibcode closed 3 years ago

kibcode commented 3 years ago

What's happened?

When using the option to show threads in comments there is a massive issue on loading more of the "answers". Sometimes when the load more link is clicked the site redirects to another site with only code showing up.

Steps to reproduce:

  1. Activate "Thread Display" in comments app
  2. Add a status update and a comment
  3. Add 4-5 comments as answers to the comment
  4. switch to another page and click the logo to come back to the main feed and click the load more link
  5. a new page opens showing only code

the code starts with:

{"run":"var replies = {\"html\":\"\\n\\n\\t\\t\\n<div class=\\\"js_view_more_reply hide\\\">\\n <div class=\\\"comment-viewless\\\">\\n <a data-hide-total=\\\"3\\\" href=\\\"#\\\" onclick=\\\"$Core.Comment.hideLoadedReplies(this, 3067); return false;\\\" class=\\\"item-viewless\\\">\\nHide 3 replies <\\\/a>\\n <\\\/div>\\n<\\\/div>\\n\\n<div id=\\\"js_comment_3088\\\" class=\\\"js_mini_feed_comment comment-item comment-item-reply js_mini_comment_item_1992 reply_is_loadmore \\\">\\n <div class=\\\"item-comment-options \\\" id=\\\"js_comment_options_3088\\\">\\n <a role=\\\"button\\\" data-toggle=\\\"dropdown\\\" href=\\\"#\\\" class=\\\"item-options\\\">\\n <span class=\\\"ico ico-dottedmore-o\\\"><\\\/span>\\n <\\\/a>\\n <ul class=\\\"dropdown-menu dropdown-menu-right\\\">\\n <li>\\n <a href=\\\"#\\\" onclick=\\\"return $Core.Comment.hideComment(this);\\\" data-parent-id=\\\"3067\\\" data-comment-id=\\\"3088\\\" data-owner-id=\\\"215\\\" class=\\\"\\\">\\n <span class=\\\"ico ico-eye-off-o mr-1\\\"><\\\/span>Hide <\\\/a>\\n <\\\/li>\\n <li>\\n <a href=\\\"#\\\" onclick=\\\"return $Core.Comment.getEditComment(3088);\\\">\\n <span class=\\\"ico ico-pencilline-o mr-1\\\"><\\\/span>Edit <\\\/a>\\n <\\\/li>\\n <li>\\n <a href=\\\"#?call=report.add&amp;height=210&amp;width=400&amp;type=comment&amp;id=3088\\\" class=\\\"inlinePopup\\\" title=\\\"Report a Comment\\\">\\n <span class=\\\"ico ico-warning-o mr-1\\\"><\\\/span>Report <\\\/a>\\n <\\\/li>\\n <li class=\\\"item-delete\\\">\\n <a href=\\\"#\\\" onclick=\\\"$Core.jsConfirm({message:'Are you sure?'}, function(){$.ajaxCall('comment.InlineDelete', 'type_id=user_status&amp;comment_id=3088', 'GET');},function(){}); return false;\\\">\\n <span class=\\\"ico ico-trash-alt-o mr-1\\\"><\\\/span>Delete <\\\/a>\\n <\\\/li>\\n <\\\/ul>\\n <\\\/div>\\n <div class=\\\"item-outer\\\">\\n <div class=\\\"item-media\\\">

What's expected?

Link should load more comments

Browsers and Devices tested

Chrome Desktop Chrome Android

phpFox version

phpFox 4.8.4 comments 4.1.7

harrison05 commented 3 years ago

Hi @Scheinwelt-Media

We will check and fix this issue.

Thanks for your report

kibcode commented 3 years ago

@harrison05 is there any workaround?

harrison05 commented 3 years ago

@harrison05 is there any workaround?

Yes, we will fix it in the next version of the Comment App.

kibcode commented 3 years ago

@harrison05 i mean... is there a fast fix we can add while waiting for the comments app getting updated? i needed to disable thread display on comments and users now missing their replies.

harrison05 commented 3 years ago

@Scheinwelt-Media Yes, you can hotfix this bug by adding this line:

$Behavior.onAjaxSubmit();

to /PF.Site/Apps/core-comments/assets/autoload.js below line 1362 (in the end of function: $('.js_comment_view_more_reply_holder').each(function() {...}); )

Regards.

harrison05 commented 3 years ago

Fixed in Comments app 4.1.8