Giter Site home page Giter Site logo

trilix-gmbh / akeneo-events-api-bundle Goto Github PK

View Code? Open in Web Editor NEW
20.0 20.0 11.0 79 KB

The Events API Bundle for Akeneo PIM delivers catalog changes as events to a 3rd party systems.

License: MIT License

PHP 100.00%
akeneo-pim deliver-events event ifttt-webhooks integrations symfony webhooks

akeneo-events-api-bundle's Issues

How can I receive the attribute option event?

I cannot see any event from PIM when I create/update the attribute option in some attributes.
Please let me know how can I receive this event or please suggest the solution for this. Thank you.

"deliver_outer_event_to_consumer" is not registered

I'm using the VM from Bitnami to run an instance of Akeneo (https://bitnami.com/stack/akeneo/virtual-machine) o VirtualBox 6.0.20 r137117 (Qt5.6.3)

I followed all the steps to install the addon, but when I try to create the job I get an error. I know it's a newbie trouble, but I don't know what to try.

TIA

bitnami@debian:/opt/bitnami/apps/akeneo/htdocs$ bin/console akeneo:batch:create-job 'Deliver outer event to consumer' deliver_outer_event_to_consumer internal deliver_outer_event_to_consumer
This script is running with a memory_limit of 800M. Please visit https://docs.bitnami.com/general/apps/akeneo/ to learn more about how to change this setting.
16:57:25 ERROR     [console] Error thrown while running command "akeneo:batch:create-job 'Deliver outer event to consumer' deliver_outer_event_to_consumer internal deliver_outer_event_to_consumer". Message: "The job "deliver_outer_event_to_consumer" is not registered" ["exception" => Akeneo\Tool\Component\Batch\Job\UndefinedJobException { …},"command" => "akeneo:batch:create-job 'Deliver outer event to consumer' deliver_outer_event_to_consumer internal deliver_outer_event_to_consumer","message" => "The job "deliver_outer_event_to_consumer" is not registered"]

In JobRegistry.php line 56:

  The job "deliver_outer_event_to_consumer" is not registered


akeneo:batch:create-job [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command> <connector> <job> <type> <code> [<config>] [<label>]

Payload for event with type product_model_created differs from Akeneo API

The payload for events of type product_model_created differs from the JSON returned by the Akeneo HTTP API.

Steps to reproduce:

  • Create a new product model in the Akeneo web interface.

The events API sends the following event

{
  "event_type": "product_model_created",
  "payload": {
    "code": "foo_bar",
    "family_variant": "test_family_variant_cp",
    "parent": null,
    "categories": [],
    "values": [],
    "created": "2020-01-13T10:43:34+00:00",
    "updated": "2020-01-13T10:43:34+00:00",
    "associations": [],
    "metadata": {
      "workflow_status": "working_copy"
    }
  },
  "event_time": 1578912214
}

When you retrieve the same product model using the Akeneo HTTP API you'll get the following response:

{
  "code": "foo_bar",
  "family_variant": "test_family_variant_cp",
  "parent": null,
  "categories": [],
  "values": {},
  "created": "2020-01-13T10:43:34+00:00",
  "updated": "2020-01-13T10:43:34+00:00",
  "associations": [],
  "metadata": {
    "workflow_status": "working_copy"
  }
}

The issue is regarding the format of the values attributes. This is has to be an object/map (like it is in the response of the Akeneo HTTP API). But if there are not values yet the Event API sends the values attribute as empty array. This is wrong.

Installation fails: URI must be a string or UriInterface

Akeneo: 3.1.9

I'm following the installation manual.
After running a command to create a job, I'm getting:

In functions.php line 62:

  [InvalidArgumentException]
  URI must be a string or UriInterface


Exception trace:
 () at /app/vendor/guzzlehttp/psr7/src/functions.php:62
 GuzzleHttp\Psr7\uri_for() at /app/vendor/guzzlehttp/guzzle/src/Client.php:75
 GuzzleHttp\Client->__construct() at /app/var/cache/dev/Container5nxyayi/getObjectSavedSubscriberService.php:8
...

Parameters and config are fine.

I am not able to get it working

I have setup Akeneo CE version 3.2.3. I have attached system-info file for more details.

I have followed the document and everything looks good. Except when I update any product it should trigger the endpoint with the payload. But I don't see any job event trigger.

I have checked logs in pim-community-standard/var/logs, /var/log/akeneo_daemon.err.log, /var/log/akeneo_daemon.out.log, /var/log/apache2/akeneo-pim_*

It seems to me I am missing one of the step, Can someone help?

ubuntu@ip-10-81-13-230:~$ /usr/bin/php7.2 /path/pim-community-standard/bin/console debug:config TrilixEventsApiBundle

Current configuration for "TrilixEventsApiBundle"
trilix_events_api:
applications:
default:
uri: 'http://exampl.com/v1/pim/event/publish'

akeneo-pim-system-info_2019-09-03_09_40.txt

Akeneo5 upgrade

Hello Trilix gmbh,

Are there any plans to upgrade the bundle to the Akeneo v5?

Payload for family_upate and family_create differs from Akeneo API

The payload for events of type family_update and family_create differs from the JSON returned by the Akeneo HTTP API.

Steps to reproduce:

  • Create a new family in the Akeneo web interface. Fill only the code attribute, leave other attributes empty
  • The events API sends the following event
{
  "event_type": "family_created",
  "payload": {
    "code": "test_family_cp",
    "attributes": [
      "sku"
    ],
    "attribute_as_label": "sku",
    "attribute_as_image": null,
    "attribute_requirements": {
      "default": [
        "sku"
      ],
      "ecommerce": [
        "sku"
      ],
      "print": [
        "sku"
      ]
    },
    "labels": []
  }
}
  • Getting the same family using the Akeneo HTTP API returns the following JSON:
{
  "code": "test_family_cp",
  "attributes": [
    "sku"
  ],
  "attribute_as_label": "sku",
  "attribute_as_image": null,
  "attribute_requirements": {
    "default": [
      "sku"
    ],
    "ecommerce": [
      "sku"
    ],
    "print": [
      "sku"
    ]
  },
  "labels": {}
}

As you can see there is a difference for the labels attribute. If the labels are empty the events API sends it as empty array but it should be an empty map/object.

Event with type product_removed not published

I was not able to receive a product_removed event. I tried to delete a standalone product as well as a product which belongs to a product model. But in both cases no product_removed event is sent.

Is there anything I can check or provide in order to investigate further?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.