[Solved] Images from forum don't show on the wordpress article comments  


dexter.deshawn
Posts: 5
Customer
(@dexter-deshawn)
Member
Joined: 2 months ago

Hi,

images posted by default registered members on forum don't appear on cross-posted comments on Wordpress, but those posted by moderators/admins are visible. Cross-posted images from Wordpress comments to forum post instead always works for everyone.

Any tips? Thank you and kindest regards.

9 Replies
Astghik
Posts: 3119
Admin
(@astghik)
Support Team
Joined: 2 years ago

Hi @dexter-deshawn,

Please provide us some examples. 

8 Replies
dexter.deshawn
Customer
(@dexter-deshawn)
Joined: 2 months ago

Member
Posts: 5

@astghik

Hi, this is a simple registered user posting on WpForo:

https://imgur.com/w9NZFcN

And this is the cross-posted comment on Wordpress:

https://imgur.com/KhfSq4W

As you can see, no attached image. Thanks.

Astghik
Admin
(@astghik)
Joined: 2 years ago

Support Team
Posts: 3119

@dexter-deshawn

Could you please leave example URLs. 

  • with images, made by admin
  • without images, made by regular users
dexter.deshawn
Customer
(@dexter-deshawn)
Joined: 2 months ago

Member
Posts: 5

@astghik

Of course. This is a cross-posted post from the forum made by a regular user, without image:

https://www.cyberpunk2020.it/2019/07/06/in-cyberpunk-2077-non-si-potranno-guidare-veicoli-volanti-ma-si-potra-nuotare/

And this is a cross-posted post made by me (admin), with image:

https://www.cyberpunk2020.it/2019/07/15/cyberpunk-2077-un-libro-illustra-il-mondo-la-lore-del-gioco/

Thanks!

Astghik
Admin
(@astghik)
Joined: 2 years ago

Support Team
Posts: 3119

ok  @dexter-deshawn, thank you. 

I understand the issue. The issue doesn't come from wpForo Blog Cross Posting add-on. This comes from WordPress. It doesn't allow regular users to include the image tag in comment content. This restriction doesn't have an effect on the admin role. Wordpress uses the wp_kses() function.

More info here:

https://developer.wordpress.org/reference/functions/wp_kses/

Please read this question it should be helpful for you.

https://wordpress.stackexchange.com/questions/113762/disallow-img-tag-in-comments

dexter.deshawn
Customer
(@dexter-deshawn)
Joined: 2 months ago

Member
Posts: 5

@astghik

Thank you!

Is there a solution for this problem, do you know of? Another comments plugin, maybe?

Astghik
Admin
(@astghik)
Joined: 2 years ago

Support Team
Posts: 3119

@dexter-deshawn,

I don't think there is some comment plugin that solves this. Haven't you tried the solution form wordpress.stackexchange.com? 

dexter.deshawn
Customer
(@dexter-deshawn)
Joined: 2 months ago

Member
Posts: 5

@astghik

I just added this line at the end of my theme functions.php and now everything works perfectly:

$allowedtags["img"] = array(
"src" => array()
);

Thanks!

Astghik
Admin
(@astghik)
Joined: 2 years ago

Support Team
Posts: 3119

Thank you for letting us know dexter.deshawn,

Glad to hear that the issue is solved. 

Share: