We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Bug in Group module | Forum

David
David Nov 15 '14

When users create a group and fill description, then there is such trash in <meta property="og:description" :


<meta property="og:description" content="&lt;b&gt;SOME TEXT&amp;nbsp;&lt;/b&gt;&lt;p style=&quot;margin:0;&quot;&gt;SOME TEXT&lt;/p&gt;" />


Dear devs, can you please release fast fix how to remove all of these html-entities from meta property?

Jenn B
Jenn B Nov 15 '14
I haven't seen that one... yet.

Another one is that videos posted to private group feeds are showing up in public feeds, yet when we return to the group, the post is gone from the feed.
ross Team
ross Nov 17 '14
David, I'm sorry but we cannot reproduce the issue you're reporting neither on demo nor our test websites.
Please provide the steps how do you create such a group.

Jenn, the issue you're referring to has been already reported.
Jenn B
Jenn B Nov 17 '14
Okay thanks Ross and for the links on the other thread also.
David
David Nov 17 '14
1. http://www.bigpro.pics/?language_id=1

2. http://www.bigpro.pics/groups/1

3. Just look: view-source:http://www.bigpro.pics/groups/1


And you will see such:

<meta property="og:description" content="&lt;b&gt;Макросъемка и все что с этим связано&lt;/b&gt;. Мет...


In other words, if there is HTML-entities (<b>...</b> etc.) in Group description, then these will be in meta property... But it is NOT correct.

The Forum post is edited by David Nov 17 '14
ross Team
ross Nov 18 '14
David, what is your group plougin and software version? because we still cannot reproduce that on our demo and test websites. 

Did you do any modifications to the code?

David
David Nov 18 '14
I have Platform version 1.7.1 (build 8274) and did nothing in Group (Oxwall native) plugin.

And no modifications to the code in the Group (Oxwall native) plugin.

Please give me a link to your demo site, I want to reproduce...

ross Team
ross Nov 18 '14
http://demo.oxwall.org/ what is the group plugin version on your website?
David
David Nov 18 '14
Groups (Oxwall Foundation)

developerKey > e547ebcf734341ec11911209d93a1054

build > 8070

David
David Nov 18 '14

Hm.. I've created a group: http://demo.oxwall.org/groups/4

And there is not any HTML-entities in <meta property="og:description"

Yuo are right.

But... I don't understand what happened in my Group plugin.

Please help to fix it in my case.

What file of Oxwall (because Group plugin I didn't touch) to correct.

Please help.

ross Team
ross Nov 18 '14
David, I will need access details to the server. Please PM me your Cpanel access details and admin access details for the website. 
David
David Nov 18 '14
But maybe can you please fix by advice because my sysadmin forbids me to give access??
ross Team
ross Nov 18 '14
David, can you please go to your DB ow_group_group table and see description column of the group? It would be great if you provide screenshot of this group description in your DB. 
David
David Nov 19 '14
Please see screenshots:


Attachments:
  ow_groups_group_2.jpg (50Kb)
  ow_groups_group_1.jpg (35Kb)
ross Team
ross Nov 19 '14
David, please try this: 


in ow_plugins/groups/controllers/groups.php


replace this: 


OW::getDocument()->addMetaInfo('og:title', htmlspecialchars($groupDto->title), 'property');

OW::getDocument()->addMetaInfo('og:description', htmlspecialchars($groupDto->description), 'property');


with this: 

OW::getDocument()->addMetaInfo('og:title', strip_tags($groupDto->title), 'property');

OW::getDocument()->addMetaInfo('og:description', strip_tags($groupDto->description), 'property');


Let us know if the issue is solved with this code?

David
David Nov 20 '14
Excellent! Well done. Actually I really don't understand, why your devs use htmlspecialchars in this case... Thanks!
David
David Nov 20 '14
I have another question about Group plugin.

Why this section of it is empty?

See the screen:



ross Team
ross Nov 20 '14
There should be a forum for a group. You have no items there because forum plugin is disabled on your website. As soon as you activate it back you will have there an option to enable forum for your groups. 


As to the htmlspecialchars - this fix will be added in the upcoming release as well.