ldwd
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Critical cart errorI had the same problem, but only on one website, the other one still worked with the same WooCommerce version number. So I checked the fatal error log as suggested above and found out I had a incorrect call in functions.php of my child theme using the hook add_action( ‘woocommerce_before_cart’, ‘my_function’, 10 );
Thanks for the help @ckadenge, and good luck to @giorgioomr, I hope you will solve it too!
@rizaardiyanto This one:
https://github.com/publishpress/PublishPress-Planner/issues/1420
I only mentioned our other topic because that’s where you pointed me to a file (for something else), in which I happen to find the bug reported in this topic. Sorry for the confusion.
@rizaardiyanto Actually, this solved the issue partly. The links are there, but they don’t work since the user doesn’t get the privilege to edit/delete due to three other if-statements with the same structure.
On line 922:
if ( ! ($current_user->user_nicename == $theComment->comment_author && current_user_can( 'pp_edit_editorial_comment' )) && ! current_user_can('pp_edit_others_editorial_comment') )
On line 1052 and 1165:
if ( ! ($current_user->user_nicename == $theComment->comment_author && current_user_can( 'pp_delete_editorial_comment' )) && ! current_user_can('pp_delete_others_editorial_comment') )
Changing those to check on ID too makes it all work correctly ??
@rizaardiyanto Okay, thanks!
From your last GitHub link in our other thread (about Stop Notify Me link) I think I localized the bug with this last issue. In
/modules/editorial-comments/editorial-comments.php
there are two if-statements that can never be true.On line 625:
if ( ( $user->user_nicename == $theComment->comment_author && current_user_can('pp_edit_editorial_comment') || current_user_can('pp_edit_others_editorial_comment') ) )
On line 638:
if ( ( $user->ID === $theComment->comment_author && current_user_can('pp_delete_editorial_comment') || current_user_can('pp_delete_others_editorial_comment') ) )
$user->user_nicename
returns a slug while$theComment->comment_author
returns i.e. full name or display name.Also, in both statements a
)
is placed wrong.I changed both to this which solves the problem:
if ( ( $user->ID == $theComment->user_id && current_user_can(
'pp_edit_editorial_comment' ) ) || current_user_can('pp_edit_others_editorial_comment') )if ( ( $user->ID == $theComment->user_id && current_user_can(
'pp_delete_editorial_comment' ) ) || current_user_can('pp_delete_others_editorial_comment') )I hope this helps you save some time ??
@rizaardiyanto Thanks, I look forward to the updates!
I do miss one part in your issues on GitHub: pp edit editorial comment and pp delete editorial comment have no effect on a users own comments (the edit/delete links are still missing) as long as pp edit others editorial comment and pp delete others editorial comment are not granted too.
Thanks!Awesome, thanks!
@rizaardiyanto Thanks for your reply. For now I made a workaround: I use Admin Columns Pro plugin which allows custom fields and inline editing in the post table, so we can delete the user from Notify Me box without opening the post.
I do have another, non-related question, please alert me if I should create a separate topic. Is it possible to export posts including Editorial Comments? I want to use WP All Export plugin for this.@rizaardiyanto, I tried on a fresh instawp installation and it works fine there, so it may have to do with server settings or restrictions on JavaScript/Ajax or so? I now have the issue of 4 websites (3 different servers) so if you have any tips, please advice ??
@kevinb Yes! Updating to 1.0.6.6 solved the problem ??
Thank you so much!
@kevinb Ah we were commenting at the same time ??
If the above info is not what helps you pinpoint this issue I can certainly give it a try at instawp.com (have not heard of it before, so I will look into it).@kevinb I just did some tests.
– If I remove the HivePress listing post type from my custom status (disabling the status is not sufficient), the button works fine.– I looked around in the plugin files. If I remove this script, the button works fine too:
publishpress-statuses/common/js/classic-edit.js@kevinb I really appreciate your effort to look into it.
I use WP 6.4.3. I tried disabling other plugins and activating Twenty Twenty-Three theme, but no luck.
I don‘t use the Classic Editor plugin, the classic editor is added/activated by HivePress.
What else could I try?
Thanks @hellokhoyer, that would be awesome!
Thank you @hellokhoyer, I will try!
@kevinb
Thank you for the quick update.I can confirm that the issue with ACF is resolved. But when a required custom field from HivePress is left blank there IS a button now, but it is disabled (and reads Publish instead of Update in case of a published post).
Can you fix this as well please?
Edit: while the issue with ACF is resolved, that button also reads Publish instead of Update for published posts. Just fyi ??