Trouble with adding comments to album


#1

I use plugin as main post type of WP posts (for that i added support of editor field on rtmedia album post type registration).
Everything is okay when i add comment to post (which is rtmedia_album type) via Admin user, but when i trued add comment under Editor role i had a warning “Warning: Missing argument 2 for RTMediaProCommentForm::show_comment_attachments() in Z:\home\localhost.dev\www\wp-content\plugins\rtmedia-pro\app\main\controllers\media\RTMediaProCommentForm.php on line 80” and next redirect didn’t executed.

Is there any solution?

Attachment Link(s):

http://rtcamp.com/wp-content/uploads/rtMedia/topics/68707/2014/07/Comments-error.png


#2

Hi Philipp,
That’s strange. That function is nothing but a filter to “comment_text” which shows media attached to comments. Can you check it with other plugins disabled and with WordPress default theme?


#3

I solved this problem by patching file: /rtmedia-pro/app/main/controllers/media/RTMediaProCommentForm.php

line 80: function show_comment_attachments($comment_text, $comment) {
changed to: function show_comment_attachments($comment_text, $comment = ‘’) {

I think you should check why filter ‘comment_text’ on which show_comment_attachments is bind passes only one argument to your function.


#4

Hi Philipp,

That’s good. We will be adding this by default so that no other user can face this issue in future.


#5