By Alexandre Cayer on Thursday, 26 March 2015
Posted in General Issues
Replies 16
Likes 0
Views 1K
Votes 0
Hi Guys,

I was presenting a demo at a partner and... bad timing... an error showed up :/ lol

It is a permission error because the link works for admin and not for the group owner (regular user). See site info and option info for more specific info on user.

When a dummy account (user: alex) is connecting, go to the notification icon and press view all, it shows 3 notifications, when i click on either one of them, it says error (they are all 3 group notifications of post of another member posting something in the group and alex is the group owner) community/stream/item/257.html

the same link works however on my admin user. consequently, alex user don't see these post on the group itself. however, since he is the group owner, that doesn't make quite some sense...

Can you have a look... i stopped the demo and tried to look around butt.... cannot see the real deal. This is a fresh ES 1.21 with very few modifications (you can see the .bak file for the original that were modified)
[edited]
wasn't sure what i use first
·
Thursday, 26 March 2015 04:28
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Alex,

I am sorry for the delay of this reply.

Hmm. This is kinda odd as group owner actually cannot see status update posted by other user in their own group, thus returning the permission error. Can you provide us with FTP access so that we can check the issue directly?

Please advise.
·
Thursday, 26 March 2015 13:23
·
0 Likes
·
0 Votes
·
0 Comments
·
here it is
·
Friday, 27 March 2015 01:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Ezrul,

I think this has a link with: http://stackideas.com/forums/group-type-custom-fied

That specific group category (Vente et achat) has 2 things:

1- default group type custom field WAS set to 3 (wanted to have INVITE ONLY has default)
2-i have remove the config option to turn on/off on visibility on group creation has seen on screen.

I have created a test group in another category and it worked off (for which i didn't set a group type default and didnt put visibility to off).
·
Friday, 27 March 2015 11:02
·
0 Likes
·
0 Votes
·
0 Comments
·
My Guest is that because it was INVISIBLE, the default value doesn't work properly and wasn't set to proper value
·
Friday, 27 March 2015 11:04
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Alex,

I am sorry for the delay of this reply.

Hm, that might be the case. However I am unable to confirm it further as the FTP is not working for me.

Please advise.
·
Friday, 27 March 2015 16:50
·
0 Likes
·
0 Votes
·
0 Comments
·
just tested this one with success
·
Friday, 27 March 2015 21:29
·
0 Likes
·
0 Votes
·
0 Comments
·
Ezrul,

Apparently I was correct. I have changed the type (was originally 0, to 3 as per screen) and it seems to have resolve the issue. so a cluster of type 0 will provide the bug WHICH is caused by the custom field group type::default.
I have set the value to 3 (which correspond to invite group) but there is a glitch in the code when registering that default value...

btw you can look on the screen that the other group created above has a type=0, which makes sense since it was created from the same category
·
Saturday, 28 March 2015 01:21
·
0 Likes
·
0 Votes
·
0 Comments
·
I have looked at type.php in custom field group type... shouldn't we see something like that in the public function onEditAfterSave(&$data, &$group) method:

...
// IN CASE OF NO VALUE SET, SET IT TO DEFAULT VALUE
if( $group-­>type==0 ) $group-­>type=$group->default;
...
or code with same logic minimally ? since I set my group type visibility to off for registration for that category this would be normal to get a 0 which would then work with that line but won't work with the content.php which should reflect the third option by default...

there are some correction to make on the custom field...
·
Saturday, 28 March 2015 01:38
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Alex,

I am not too sure how to reproduce this since I can not login to the site with the user "alex". Also, I don't think your assumptions are entirely correct. Please specify the steps taken the to reproduce this error and we'll test this on our end.
·
Monday, 30 March 2015 02:17
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Mark,

I made a single change to the custom field but I realize that even without it there is still a bug, thus we might shall start straight to this.

On first screen, which is the group type without mod, I have set the default value to 3, which is the invite only value both for database and also by what it is set to in the html. When I try created a group from that category, see screen, the default value doesn't work (the default isn't reflect - the selected value is the first and not the third). This is a smaller error that one can change the value manually on the front end even so its not that great ....

However, my guess is that front end bug translate in the one mod I make which is: "add the possibility to remove the group type from registration". This translate into remove: "visible_registration": true from the config.json. So now in backend, as on screen, there is in VIEW, an option to APPEARING DURING GROUP CREATION set to OFF.

Therefore, if I connect the two's:
i) I set the default value to invite ("3") to a specific group category and set APPEAR DURING GROUP to OFF.
ii) If default is invite and it's not visible, that shall equals an invite only group.

However, when I looked to that type of group in the database, instead of seeing a 3, I saw a 0. Therefore, everything in this group was then way mixed up! When I manually switched the type to 3 instead of 0, the notifications that were not working before were then working perfectly. (see database screen from previous screen+post)

Therefore, I realized that the way default value is first displayed on screen is not working and secondly that the way it is recorded is not working properly because if the value is default AND THEN not changed it should still be default but instead it got 0 and caused a lot of funky stuff.

Principle: why asking what kind of group type they want if its already defined at the start!
·
Monday, 30 March 2015 03:06
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Alexandre,

I am sorry for the delay of this reply.

We've confirmed that there was a bug involving the default values of the group does not following the default values save from the backend. I've applied the fix inside your :
1) /media/com_easysocial/apps/fields/group/type/type.php
2) /media/com_easysocial/apps/fields/group/type/config/config.json
3) /media/com_easysocial/apps/fields/group/type/themes/default/content.php (hide the field)

However, please note that the only proper way to hide the field is to add style="display:none;" inside the division. This is because it will still try to get the value from the field during the saving. Thus the only proper way is to hide it via css so that it will not return the empty value during saving. Can you verify it for me?
·
Monday, 30 March 2015 19:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Ezrul, Mark,

First I just realized, there is also a "Event type" custom field which as probably probably the same bug.

The default value is working fine now.

I have added a config to turn it on or off (<div <?php if($visible_reg==true) echo 'style="display:none"'; ?>>).

However, turning it on or off works fine but when display style is set to none: we are left with this.... on screen.

Any suggestion to have the title and subtitle gone without having it permanently remove ?
·
Tuesday, 31 March 2015 14:30
·
0 Likes
·
0 Votes
·
0 Comments
·
Either through the onRegister event in php.. with something like:
if ($this->params->get('visible_reg')==false) {
$this->set('title', '');
$this->set('description', '');
}

Or either with a content.js which would disable the whole line. However, your javascript structure is more than complicate..

EDIT: In fact, this could be done with pressing the Show title and Show description. What is the php code to do this ? I will include it along my single option so that it all make sense. Thanks
·
Tuesday, 31 March 2015 15:54
·
0 Likes
·
0 Votes
·
0 Comments
·
the modify option doesn't let me upload the screen, here is what I was talking about
·
Tuesday, 31 March 2015 16:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Alexandre,

I am sorry for the delay of this reply.
You can find the file that generate custom field titles and description from your:
1) /administrator/components/com_easysocial/themes/default/fields/sample.title.php for title and,
2) /administrator/components/com_easysocial/themes/default/fields/sample.description.php for description.

and the config file is from /administrator/components/com_easysocial/default/fields/config/group.json.

However do note that the title and description is actually shared among all the custom field
·
Tuesday, 31 March 2015 18:10
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post