Page 1 of 3

Component ignores groups access level

Posted: Sat Feb 15, 2020 7:57 pm
by macstalker
Hi there,

To reproduce this issue:
1. Make sure you have default Guest access level (Means only guests suppose to have access to on the frontend)
2. From FlexBanners create Guests category and select Guest from Access dropdown.
3. Create new banner with Guests category.
4. Create appropriate module with default settings.
5. Check banner from the frontend as a guest, then login on the frontend and check again. Banner still visible :?

Same situation with any other access level, component completely ignores it. By the way, our module has Public access level to show all ads thru it. The only temporary workaround I see is to create multiple modules for each access level, which is very inconvenient if you have dozens access levels and module positions to display.

Thanks!

Re: Component ignores groups access level

Posted: Sun Feb 16, 2020 10:30 am
by Andrew998
I'll need to look at this. FlexBanners is based on the standard Joomla Banners component and that does not respect the access level in this way.

I'll, take a look when I can but this is the first time anyone has wanted to use FlexBanners in this way. As you say, the normal way to achive this would be by using multiple modules.

Re: Component ignores groups access level

Posted: Wed Feb 26, 2020 3:22 pm
by Andrew998
I'm close to having an implementation of this but, unfortunately, it has shown up a small issue with another part of the extension. Hopefully it won't be long though.

Re: Component ignores groups access level

Posted: Wed Feb 26, 2020 8:54 pm
by macstalker
Thanks for the update! I'm really appreciate your work to add this feature.

BTW, there is another nasty bug which affects few recent versions of FlexBanner: Images can not be uploaded at all. I've tried fresh installation of latest Joomla and latest FlexBanner. Tried under multiple configurations macOS/Debian, running php 7.2/7.4, nginx 1.16/1.17, browsers Safari/Firefox.

TypeError: document.adminForm.jform_imageurl.value.test is not a function in:

document.adminForm.jform_imageurl.value.test(/gif/g)
||document.adminForm.jform_imageurl.value.test(/png/g)
||document.adminForm.jform_imageurl.value.test(/jpg/g)

Another small bug /images/blank.png is missing after installation

Re: Component ignores groups access level

Posted: Thu Feb 27, 2020 2:55 pm
by Andrew998
Strange, I'm not seeing the image upload problem in testing. I'll have to dig deeper.

Re: Component ignores groups access level

Posted: Thu Feb 27, 2020 4:43 pm
by Andrew998
I'm going ahead with the release of 4.1.13 which honours the access levels.

I'll have to look at the upload issue seperately because, at present, I haven't managed to replicate the fault.

Re: Component ignores groups access level

Posted: Thu Feb 27, 2020 7:52 pm
by macstalker
Thanks, unfortunately after updating I've got error notice on the frontend and all banners gone.

×
Error

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'IF((select count(distinct id) from `#__flexbanners` where `#__fle' at line 5

BTW, I can create account for you on one of my testing sites. Just give me your email

Re: Component ignores groups access level

Posted: Thu Feb 27, 2020 7:59 pm
by Andrew998
Strange, it's all good in testing. You can reinstall 4.1.12 for now which should fix the initial problem.

Re: Component ignores groups access level

Posted: Thu Feb 27, 2020 8:51 pm
by Andrew998
I can see the issue and I'll try and sort it out tomorrow.

Re: Component ignores groups access level

Posted: Fri Feb 28, 2020 3:45 pm
by Andrew998
I think I have it fixed but I can't access your site (blocked IP).

Can you try this please: https://www.inchhosting.co.uk/releases/flexbanner/com_flexbanners_4.1.13.zip