Rules Implementation Error

Created on 2 February 2023, over 2 years ago

Problem/Motivation

I have a problem when I implement it with the Rules module, when I create a rule and select Facebook Post it only shows me a "Summary", it does not show me the "Context Variables" field to put the status of the post (as the module does Social Post Twitter). I leave an image of how it looks and how it looks in the Social Post Twitter module

Error: ArgumentCountError: Too few arguments to function Drupal\social_post_facebook\Plugin\RulesAction\Post::doExecute(), 0 passed and exactly 1 expected en Drupal\social_post_facebook\Plugin\RulesAction\Post->doExecute() (lรญnea 162 de /home/u151214321/domains/.../public_html/web/modules/contrib/social_post_facebook/src/Plugin/RulesAction/Post.php)

Steps to reproduce

1. Create a new rule.
2. Select event: "After updating an element content entity".
3. Create Action: Select "Facebook Post".

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Needs review

Version

3.0

Component

User interface

Created by

๐Ÿ‡ฆ๐Ÿ‡ทArgentina OPtii

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @OPtii
  • ๐Ÿ‡ฆ๐Ÿ‡ทArgentina OPtii
  • Status changed to Active over 2 years ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • ๐Ÿ‡ฆ๐Ÿ‡ทArgentina OPtii

    Solution

    1. Go to modules/contrib/social_post_facebook/src/Plugin/RulesAction/Post.php
    2. In this file modify line 23: "context" to "context_definitions"

  • ๐Ÿ‡ฆ๐Ÿ‡ทArgentina OPtii
  • ๐Ÿ‡ง๐Ÿ‡ฏBenin delacosta456

    hi
    any update about this please
    i am also facing this issue
    Thanks

  • ๐Ÿ‡ง๐Ÿ‡ดBolivia manuvelasco Bolivia

    The same issue here, any update?

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States MegaKeegMan

    I can make an attempt to clean this up. This module has been in a bit of a mess for a few years now. As a result of a lot of changes in facebook, I have mostly been posting externally by calling a post method that is in the .module file, which requires passing the page id and everything to it. The rules action plugin uses the original doPost, which I have not used in a very long time, but I can return to this issue once I have updated the module to actually utilize doPost like has been expected. In the meantime, let me know if there is still interest, or if an ECA integration would cover people's needs at this point in time. I intend to add an ECA action plugin anyway.

  • ๐Ÿ‡ง๐Ÿ‡ฏBenin delacosta456

    @megakeegman

    IMHO i think it will be nice if you could on this for US so that we may not necessary install ECA for this functionality
    Thanks

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States MegaKeegMan

    Would be helpful if someone could test the issue fork and provide feedback. If you need it, there is updated documentation pending in https://www.drupal.org/project/social_post_facebook/issues/3422380 ๐Ÿ’ฌ How to configure applications on Facebook Active

    Feedback on that documentation would be helpful too.

    I am not very familiar with rules, so will be relying on people here for feedback.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States MegaKeegMan

    Also noteworthy, I have started the ECA implementation in a separate issue fork: https://www.drupal.org/project/social_post_facebook/issues/3536480 โœจ Integrate with ECA Active . It allows some flexibility as far as choosing which user's account should be doing the posting. I haven't done anything like that for this RulesAction plugin, mostly because I don't have experience with setting context for rules, but maybe while we are on this topic it would be good to consider what people want/need out of this.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States MegaKeegMan

    Additionally, I am adding a sitewide account functionality ( https://www.drupal.org/project/social_post_facebook/issues/3536481 โœจ Sitewide account Active ), while preserving the per-user functionality, so this is one other thing to consider as far as what kinds of RulesAction might be possible

Production build 0.71.5 2024