Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi!
I created a simple Rule that search "drupal" in Twitter, display a Warning drupal system message with:
"A new tweet was published about Drupal:\r\n[tweet:text]".
First cron treatment went great.
Subsequent treatment trigger this Guzzle error message:
Guzzle\Service\Exception\ValidationException: Validation errors: [since_id] must be of type integer in Guzzle\Service\Command\AbstractCommand->validate() (line 358 of /home/alexandre/hbgt.fr/fluxkraft/sites/all/vendor/guzzle/guzzle/src/Guzzle/Service/Command/AbstractCommand.php).
Should I add a condition? a value in the Rule?
Did I miss something else?
Thank you.
Alexandre
Comments
Comment #0.0
sashainparisbetter code display
Comment #1
sashainparisI had it by to work changing the Json file and describing Since_id type as "" (so no condition to validate).
But Twitter API v1.1 definitly say:
https://dev.twitter.com/docs/api/1.1/get/search/tweets
Something must be wrong here. The since_id value must not be the one expected.
Comment #2
sashainparisComment #3
crizWe have changed some code here just before DrupalCon. First cron run should only return the last tweet. The second cron run returns all tweets since then. Just to go sure that actions don't effect tweets from the past, can be very dangerous...
Please report if you experience troubles here with latest code.
Comment #3.0
criztypo
Comment #4
skorzhHave the same an error.
The possible cause of the error:
[since_id] is too long for the integer type if you use 32-bit builds of PHP, because
32-bit builds of PHP:
Integers can be from -2147483648 to 2147483647
64-bit builds of PHP:
Integers can be from -9223372036854775808 to 9223372036854775807
example of [since_id]: 435369524938817536
you can check it, if you output
dpm(435369524938817536);
on your site, it outputs:for 32-bit builds of PHP: 4.3392976229867E+17
for 64-bit builds of PHP: 435369524938817536
Check your PHP_INT_SIZE and PHP_INT_MAX constants, PHP_INT_SIZE for 64-bit is 8, for 32-bit is 4.
I have tested the same code at 32-bit and 64-bit builds, and it works good for 64 and don't work for 32.
I used fluxservice (7.x-1.0-rc1) + fluxtwitter (7.x-1.0-beta2) modules.
Comment #5
crizConfirming this issue of too long values for [since_id] on some systems.
Comment #6
sashainparis