After i create the content am getting the following error .
Notice: Undefined index: modules/fivestar/widgets/basic/basic.css in Drupal\fivestar\Plugin\Field\FieldFormatter\StarsFormatter->viewElements() (line 48 of modules/contrib/fivestar/src/Plugin/Field/FieldFormatter/StarsFormatter.php).

Comments

saradaprasad17 created an issue. See original summary.

saradaprasad17’s picture

Status: Active » Needs review
StatusFileSize
new636 bytes

Fixed the issue . Uploaded patch file .

sylus’s picture

Not sure how this fixed your issue?

When I changed to any other custom style I couldn't see the icons on the front end. You are adding the css stylesheet to the name attribute.

Should be:

Array
(
    [name] => hearts
    [css] => modules/contrib/fivestar/widgets/hearts/hearts.css
)

With the patch:

Array
(
    [name] => modules/contrib/fivestar/widgets/hearts/hearts.css
    [css] => modules/contrib/fivestar/widgets/hearts/hearts.css
)
davps’s picture

Assigned: saradaprasad17 » Unassigned
StatusFileSize
new1.16 KB
gg24’s picture

Status: Needs review » Reviewed & tested by the community
dbt102’s picture

Thanks for reporting the issue @saradaprasad17, and for the input of everyone else. I tested on a fresh D8 install and I do not see the error after I apply the -4 patch. Did not check it with other custom styles @stylus. If that is still a problem, please reopen this issue. Will commit soon ...

  • dbt102 committed 1438f63 on 8.x-1.x authored by david.pashaev
    Issue #2854077 by saradaprasad17, david.pashaev, gg24, sylus, dbt102:...
dbt102’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

magicmirror’s picture

I am getting this error even with the latest module, which appears to have the patch included. However mine is line 43:

Notice: Undefined index: modules/fivestar/widgets/outline/outline.css in Drupal\fivestar\Plugin\Field\FieldFormatter\StarsFormatter->viewElements() (line 43 of modules/contrib/fivestar/src/Plugin/Field/FieldFormatter/StarsFormatter.php).

nikita_tt’s picture

@magicmirror
If you still see this error apparently there are configs which keep "modules/fivestar/widgets/......." settings. Just go through all config files in a "sync" directory and change "modules/fivestar/widgets" to "modules/contrib/fivestar/widgets/".

In my case, I changed "modules/fivestar/widgets/basic/basic.css" to "modules/contrib/fivestar/widgets/basic/basic.css" and re-imported changed configs.