-
AuthorPosts
-
August 12th, 2020 at 12:58 #106462
I updated to WordPress 5.5 this morning, and now for some reason comments are now longer appearing under posts. The comment count for each post is correct, and comments can be submitted and appear under “Comments” in the WordPress dashboard, but they don’t appear under each post.
Mantra theme is v3.2.0
No PHP errors.
I disabled all plugins, no luck.
I switched theme to TwentyTwenty and all appears to be working.
Switched back to Mantra, and I rolled back WordPress to 5.4.2 and all kicked into action again, although only new comments are appearing, not ones prior to the WP 5.5 update.
I’m wondering if it’s some incompatibility with Mantra and WordPress 5.5?
-
This topic was modified 4 years ago by
Rufus.
August 12th, 2020 at 14:06 #106468Hello. I have the same.
I have exactly the same problem after updating. On a standard topic, comments work. On the topic “Mantra” no.
There is another site on the topic “Nirvana” – everything works there.August 12th, 2020 at 19:04 #106469I’m also having the same. Thanks for sharing your experience, Rufus. Saves me the testing.
Note that Mantra still has the bug of displaying categories (poorly formatted) when set not to.
Website: davidya.ca
-
This reply was modified 4 years ago by
davidfb. Reason: update
August 12th, 2020 at 22:37 #106480Same issue here as well, after the 5.5 update the comments are disabled when you break comments into pages with however many top level comments per page.
Cannot simply disable breaking comments into pages as that slows down any page/post with a plethora of comments. Can someone please help?
August 12th, 2020 at 23:34 #106481Interesting. I have comments for some posts which are split over multiple pages (I can’t remember how pagination is done, it may be a plug-in – but I did try disabling plugins).
in my case, with WordPress 5.5 and Mantra 3.2.0, users can comment, but once submitted the comment does not appear under the post.
An excerpt of the comment does appear in a widget (provided by the “Decent Comments” plugin) in the sidebar though, so whatever Decent Comments is doing to pull the comments seems to be different to Mantra.August 12th, 2020 at 23:37 #106482Yes, same here. The submit comment box is present and the comments total but existing comments are not displayed. I disabled all related plugins and it made no difference.
Currently Mantra is updated to support WP 5.2
August 13th, 2020 at 00:10 #106483Will support see these forum posts or should we contact them some other way? Definitely need to have comments show up after the 5.5 update
August 13th, 2020 at 00:41 #106484For Free themes, this is the way. Zed should check in soon. Don’t think they’re full-time at this so it may be a few days. I’m looking at moving to a more recent and supported theme as they’ve not fixed the bugs from the last update Mantra yet.
August 13th, 2020 at 05:37 #106485I broke 50 pieces. Disabled splitting – didn’t help. Temporarily switched to another topic.
August 13th, 2020 at 10:56 #106488I have a workaround which fixed it for me.
The problem appears to be with the WP_Comment object.
It has an array key called “comment_type”.Mantra is looking for a comment_type which is which is an empty string (”).
It looks like WordPress 5.5 has set a specific value for comment_type, the value being “comment”.
My workaround involves editing one of the Mantra files (I’m not sure if this can be done somehow in functions.php – I suspect not).
This is for Mantra 3.2.0 by the way.
File is wp_content/themes/mantra/includes/theme-comments.php
Line 22 is
case ”:
Add a line after this with:
case ‘comment’:This will take both comment_type values into account and treat them the same.
August 13th, 2020 at 11:12 #106491I’ve found a workaround which fixed it for me.
The problem appears to be with the WP_Comment object.
It has an array key called “comment_type”.Mantra is looking for a comment_type which is which is an empty string (”).
It looks like WordPress 5.5 has set a specific value for comment_type, the value being “comment”.
My workaround involves editing one of the Mantra files (this can probably be done more elegantly in functions.php but I just wanted to demonstrate the problem).
This is for Mantra 3.2.0 by the way.
File is wp_content/themes/mantra/includes/theme-comments.php
Line 22 is
case ”:
Add a line after this with:
case ‘comment’:This will take both comment_type values into account and treat them the same.
-
This reply was modified 4 years ago by
Rufus.
August 13th, 2020 at 14:03 #106493I have this problem too. The fix suggested by Rufus did not work for me — so I ended up simply rolling back to WordPress 5.4.2 and restoring the database from before the upgrade. I’m hoping this will be corrected soon.
August 13th, 2020 at 16:43 #106495Rufus, thank you very much!
You are my savior)
It helped me, the theme works.
Thank you very much again! All the best to you!August 13th, 2020 at 20:13 #106513For me, Mantra had several bugs that had not been addressed. This was the kicker. It’s become an old theme, not well integrated with modern WordPress. Why keep trying to patch and work-around?
I’ve migrated to Esotera with the Arcanum child theme. I was easily able to restore the general flow of the site but with a refreshed look. The bugs are gone, there’s new features and more customizations, it’s integrated with WordPress Customizer, and theres a Plus upgrade for more features.
A few things I plan to tweak but am pleased with the result. Am also pleased with Cryout. Looked at another makers theme that was highly recommended. It had a couple of cool features but was full of bugs and missing customizations.
August 14th, 2020 at 19:44 #106535@Rufus – thanks a lot! Had the same problem with Mantra after an update to WP 5.5. Your suggestion about editing wp_content/themes/mantra/includes/theme-comments.php worked fine for me for 2 websites!
August 15th, 2020 at 12:41 #106542Just thought I would share — I have modified the mantra/includes/theme-comments.php file, but I did it slightly differently than @Rufus suggested. I used the equivalent template of the Kahuna theme as a model — this can be found here –
https://themes.svn.wordpress.org/kahuna/1.6.1.1/includes/comments.php – I just chose that one because it is the most recently updated free Cryout theme.So now my Mantra template contains this switch statement:
function mantra_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case 'pingback' : case 'trackback' : ?> <li class="post pingback"> <p><?php _e( 'Pingback: ', 'mantra' ); ?><?php comment_author_link(); ?><?php edit_comment_link( __('(Edit)', 'mantra'), ' ' ); ?></p> <?php break; case '' : default : ?>
The pingback/trackback switch statements were at lines 55-60 of the original Mantra template. I moved them to the beginning of the switch statement following the Kahuna example, and also because I just thought it would be cleaner to have the default spec at the end.
The main difference with my solution is that I am using “default” rather than “case ‘comment'”. Probably doesn’t matter … just a matter of coding preference.
August 18th, 2020 at 18:04 #106624This might be a dumb question, but how do I go about editing the comments.php lines of code to do this? I’ve gone into the theme editor but I don’t think that’s the correct area to be editing the code.
Can anyone help me further? Is there something I can put into functions.php? I’m unsure how to navigate to wp_content/themes/mantra/includes/theme-comments.php
Thank you
August 19th, 2020 at 00:02 #106628Do you have FTP access? You can edit directly through the theme editor in WordPress– I prefer using SFTP for edits simply because it makes it easier for me to make a backup copy of the original file.
I think that a functions.php modification would be preferable, but I personally wasn’t sure how to write one. Given that the Mantra theme hasn’t been updated since May 2019, there’s probably no downside to editing the theme file itself. (I’m sure that if and when a theme update is pushed out, it will address this issue).
August 20th, 2020 at 22:59 #106703No, I do not have FTP access. When editing within the theme editor, where would I copy/paste the code into through the editor? Thank you for your help, not familiar with this type of editing the theme code and what not 🤷♂️
August 22nd, 2020 at 11:20 #106739If you are not comfortable editing the theme files, you might want to just wait for an upgrade. I contacted the theme developer via the comments form, and have received this response:
Thank you informing us of this issue. We will release an update for Mantra as soon as possible to address it.
They didn’t specify a date, but the changes I made were based on something they already have in another theme, so I don’t think it will take them long.
If you do want to make changes, I would suggest you follow the instructions that @Rufus provided in post-106488, and simply add this line immediately after line 22. (So it would be a new line #23).
case 'comment' :
You’ll find the theme-comments.php template under the “includes” section of the theme editor.
August 23rd, 2020 at 22:15 #106772Zed
Cryout Creations mastermindI am sorry for the slow reply, but we’ve been kept somewhat occupied for the past week with some personal matters.
We are aware of the issue since @abigal2 pointed it out and have already implemented the necessary correction in our development code to support WordPress’ 5.5 change making comments to always have a type.
Unfortunately, due to guideline changes and requirements imposed on repository themes since the last Mantra release, submitting the next update requires from us to perform extra changes in the theme and these will need some additional time to implement.
Until then, if you’re not comfortable with the manual edits described above I’ve added a theme zip that includes the necessary correction to our own archive.
You can use this plugin to update an already installed theme via manual zip uploads.
Alternatively WordPress 5.5 theoretically implements this feature as well, however it hasn’t worked in my tests (if it does work for you, then that’s great). Later edit: apparently this was an issue for sites hosted on Windows only and is fixed in 5.5.1.-
This reply was modified 3 years ago by
Zed.
If you like our creations, help us share by rating them on WordPress.org.
Please check the available documentation and search the forums before starting a topic.August 23rd, 2020 at 23:39 #106773August 24th, 2020 at 19:00 #106794September 3rd, 2020 at 13:24 #107073Zed
Cryout Creations mastermindThe official Mantra 3.3.0 update released this week includes the fix for the missing comments issue.
Thank you all for suggesting corrections and for the patience.If you like our creations, help us share by rating them on WordPress.org.
Please check the available documentation and search the forums before starting a topic.January 6th, 2021 at 15:16 #111541Hi Guys,
I am using zuki theme from ElmaStudio and i am facing the exact same problem stated above. Can anyone suggest me a possible solution for zuki theme also?
Any assistance will be very much appreciated.
Thanks in advance.-Nitin
January 17th, 2021 at 22:20 #112461Zed
Cryout Creations mastermind@btmz.nitin, I think you’d better ask the theme’s authors about this. It may due to the same WordPress change (I mentioned earlier here).
If you like our creations, help us share by rating them on WordPress.org.
Please check the available documentation and search the forums before starting a topic.February 16th, 2021 at 01:01 #114082Note that if you have a child theme that uses Mantra as the parent, and you have added ‘mantra_comment’ in your child theme’s functions to override how Mantra displays comments, you have to modify their base ‘mantra comment’ to include a new ‘case statement:
switch ( $comment->comment_type ) : case '' : case 'comment': // add this line
This ‘bit’ me because my modified mantra_comment overrode the fix that Mantra installed to fix the bug in their original ‘mantra_comment’ function. Adding the above fixed the issue of comments not displaying in my child theme that uses Mantra as the parent – my implementation of the child theme used ‘mantra_comment’ from prior versions.
September 20th, 2021 at 17:02 #121788Just to update this discussion, I upgraded to WP 5.8.1 this morning, but I had noticed this problem for a while. After the upgrade, the comments were still not being displayed. I applied the change Rufus suggested on August 13, 2020, and the problem is now fixed!
Thank you, Rufus!
-
This topic was modified 4 years ago by
-
AuthorPosts
The topic ‘Comments not appearing since upgrading to WordPress 5.5’ is closed to new replies.