[Solved] Rating Element not working

I can't replicate.
Which exact Joomla and Fabrik version are you running?
Which Joomla template? (Did you try with Joomla's standard Protostar template?)
 
I can't replicate either. Works for me in all my reference templates (Protostar, Gantry 5, Helix III, Joomlart).

-- hugh
 
Joomla! 3.8.10 with cache disabled. (I saw the notice after updating)
Fabrik 3.8.1
Wright Framework.
Just tested with protostar and stars display.
What is the issue here
 
Never heard of Wright Framework. Is it Bootstrap? If so, what version? We use Bootstrap icons for the stars, so if your template doesn't have the icons 'star' and 'star-empty' then it won't work, and you'll have to either override the layout for that element, or add the icon "translation" to the fabrik-icon.php layout.

Or, if it's Bootstrap 3, and you haven't applied the bs3 layout overrides, doing so would solve the problem (and any other weird display issues you might be having):

https://github.com/Fabrik/Fabrik-Joomla-alt-layouts

-- hugh
 
changed star-empty to star-0.
I got a better behavior.
The stars show now. Just the hover state remains even after the mouse has been removed. Until a click outside is done before the ...I guess "visited" state is restored
 
Where did you change the icon? Looking at the code, I think you'll have to do it with the fabrik-icon.php layout, not the element layout.

A generic example of the fabrik-icon layout is here:

https://github.com/Fabrik/Fabrik-Joomla-alt-layouts/blob/master/generic_icons/fabrik-icon.php#L65

... so you would need:

Code:
case 'star-empty':
    $iconParts[$key] = 'icon-star-0';
    break;

... because the Javascript needs to know the icon names, so we pass it in as an option, generated like this:

Code:
$opts->starIconEmpty = FabrikHelperHTML::icon("icon-star-empty", '', '', true);

... calling the icon() helper, which uses the fabrik-icon.php layout to handle re-mapping of icon names.

I'm not sure if that's what your hover state issue is, but I suspect it may be, as the JS has to know which icons to switch between on mouse in and mouse out, and if you didn't modify the fabrik-icon layout, it'll still be trying to use icon-star-empty.

-- hugh
 
Ok. Its the fabrik-icon.php I modified as instructed above so I believe I'm on the right track.

In any case, I checked the font-awesome css of the template and it had the star-empty class so I'm confused as to why it is not working. In any case, cos I really dont want to start troubleshooting that, I just looked for another star class and was lucky to find that one that also looks like empty and just used that instead.

I believe there are still underlying issues with compatibility. Just hoping it wont be a problem
 
In any case, I checked the font-awesome css of the template and it had the star-empty class

Yeah, that's why I said somewhere (maybe in another thread) that it seems to have a weird Font Awesome hybrid that has icon-whatever names (either instead of or as well as the standard Font Awesome fa-whatever), and that for some reason their icon-whatever ones don't seem to work - I tested with icon-remove (for that modal close button), which their font-awesome.min.css has, but it doesn't work.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top