FiveStar Feeds integration

Created on 31 January 2021, over 3 years ago
Updated 20 August 2023, 10 months ago

This is target to import data via Feeds β†’ to fivestar field

✨ Feature request
Status

Needs work

Version

1.0

Component

Code

Created by

ivnish Poland

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡¦Ukraine proweb.ua

    #2

    The website encountered an unexpected error. Please try again later.
    Error: Class "Drupal\fivestar\Feeds\Target\FiveStar" not found in Drupal\feeds\Entity\FeedType->getMappingTargets() (line 305 of modules/contrib/feeds/src/Entity/FeedType.php).

    in
    /admin/structure/feeds/manage/product/mapping
    /admin/structure/feeds/manage/product/tamper

  • πŸ‡³πŸ‡±Netherlands MegaChriz

    Re #7

    I see that in the patch from #2 the namespace is incorrect:

    +++ b/src/Feeds/Target/FiveStar.php
    @@ -0,0 +1,34 @@
    +namespace Drupal\feeds\Feeds\Target;
    

    It should be:

    namespace Drupal\fivestar\Feeds\Target;
    

    The multiplication value (now 20) should not be hard-coded. Because I think that this value should depend on the number of stars that are configured on the field. If it are five stars (the default), then it should indeed be 20. But if for example the number of stars is configured to be 8, then I assume that a multiplication of 20 is too high.

  • πŸ‡ΊπŸ‡¦Ukraine proweb.ua

    thanks, the error is gone.

  • πŸ‡ΊπŸ‡ΈUnited States TR Cascadia

    I think this would be easy to put into Fivestar if we had a test case that demonstrated it works. That way it would also be trivial for someone to come along and say, hey, what about 8 stars? Because the test case could be trivially patched to set the number of stars to something different than the default and prove that it still works properly. Or, here's a thought, have the test use a non-default number of stars so that there are no built-in assumptions.

    The Feeds module has a bunch of tests for FeedsTarget plugins - these serve as great starting points and examples.

    @ivnish, the issue is still assigned to you - are you still planning to work on this?

  • Issue was unassigned.
  • ivnish Poland

    Sorry, this is not actually for me now

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update 10 months ago
    4 pass
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.5 + Environment: PHP 7.3 & MySQL 5.7
    last update 10 months ago
    4 pass
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 8
    last update 10 months ago
    4 pass
Production build 0.69.0 2024