Closed Spooky063 closed 1 year ago
Hi @Spooky063 , We were not able to replicate the above issue. Please provide the steps to reproduce the issue. Is there any custom code that is triggered when purchasing the rate plan?
Hello,
I will clarify the steps to follow:
Type of item to reference
on "XRate plan", then save the field settingsNow, when you set a rate plan on this new field and go on the node, the link to purchase the rate plan is correctly showing. But when you want to buy this rate plan, I get the error message above.
According to my debugger, the problem is here: Drupal\apigee_edge\Entity\FieldableEdgeEntityBase::validate(). When the code try to execute the line
$violations = $this->getTypedData()->validate();
Hi @Spooky063 ,
I am still not able to replicate the issue. I followed the steps that you have mentioned , I was able to purchase the rate plan, no error was thrown. Can you clear the cache once and try again purchasing the rate plan.
Hi @Spooky063 ,
Closing this issue for now, feel free to reopen if the problem still exists.
Hi, we noticed that the issue that @Spooky063 is happening using Postgres DB. You don't need to follow the steps mentioned, to be able to replicate this is necessary to go to the Buy API and select any of the available Products (Pricing Details button) to see the details, after clicking on the Purchase Product the error is happening.
I'm trying to find the place where this validation occurs without success.
Here is the error on watchdog:
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type bigint: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" LINE 5: ...."status" = '1') AND ("node_field_data"."nid" IN ('xxxxxxxx-... ^: SELECT "base_table"."vid" AS "vid", "base_table"."nid" AS "nid" FROM "node" "base_table" INNER JOIN "node_field_data" "node_field_data" ON "node_field_data"."nid" = "base_table"."nid" WHERE ("node_field_data"."status" = :db_condition_placeholder_0) AND ("node_field_data"."nid" IN (:db_condition_placeholder_1)); Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx ) in Drupal\Core\Entity\Query\Sql\Query->result() (line 272 of /app/core/lib/Drupal/Core/Entity/Query/Sql/Query.php).
I tried with the same base code using MySQL DB and works fine.
Hello, indeed I used Postgres during my tests and this is the error I encountered. Let me know if you find a solution.
I just validated with Drupal 8.9.20, Drupal 9.3.2 and the error is the same (is not working with Postgres) @divya-intelli can we reopen the issue?
On my side, I'm trying to find the fix. If I find something I will share via Pull Request so you can review too
Thanks!
Thank you @asantosnbpo for validating. We are looking into this issue. Feel free to create a PR for this.
Once we applied the patch on Drupal 8.9.20 and Drupal 9.3.2 both using Postgres DB works as expected.
Thanks for the effort
Description
We are currently testing the transition of our solution from Apigee to Apigee X. So I modified the credentials via the module to be able to connect to the new platform (https://www.drupal.org/docs/contributed-modules/apigee-edge/configure-the-connection-to-apigee#configure-credentials-hybrid).
And when I wanted to buy a rate plan, I had an error.
Steps to Reproduce
I logged in (with a user that is a developer), I went to the purchase page of a rate plan
/user/{user}/monetization/xproduct/{product}/plan/{plan}/purchase
, I saw the form and I click on the "Purchase" button.But as soon as I click, I get this error:
The problem here is that the rate plan identifier is not an integer but a string (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
Version Info
Drupal core 9.4.7 Apigee API Catalog 8.x-2.6 Apigee Edge 2.0.5