Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getTemplates has a Fatal Error when a template has an image field #76

Open
tanabi opened this issue Feb 14, 2023 · 1 comment
Open

getTemplates has a Fatal Error when a template has an image field #76

tanabi opened this issue Feb 14, 2023 · 1 comment

Comments

@tanabi
Copy link

tanabi commented Feb 14, 2023

Describe the bug
getTemplates has a Fatal Error when a template has an image field

PHP Fatal error:  Uncaught JMS\Serializer\Exception\LogicException: The type value "image" does not exist in the discriminator map of class "Eversign\FormField". Available types: date_signed, signature, initials, note, text, checkbox, radio, dropdown, attachment, checkboxGroup in /root/work/qsbooker/public_html/wp-content/plugins/qsbooker/vendor/jms/serializer/src/GraphNavigator/DeserializationGraphNavigator.php:240
Stack trace:
#0 /root/work/qsbooker/public_html/wp-content/plugins/qsbooker/vendor/jms/serializer/src/GraphNavigator/DeserializationGraphNavigator.php(178): JMS\Serializer\GraphNavigator\DeserializationGraphNavigator->resolveMetadata()
#1 /root/work/qsbooker/public_html/wp-content/plugins/qsbooker/vendor/jms/serializer/src/JsonDeserializationVisitor.php(112): JMS\Serializer\GraphNavigator\DeserializationGraphNavigator->accept()
#2 /root/work/qsbooker/public_html/wp-content/plugins/qsbooker/vendor/jms/serializer/src/GraphNavigator/DeserializationGraphNavigator.php(140): JMS\Serializer\JsonDeserializationVisitor->visitArray()
#3 /root/work/qsbooker/public_html/wp-content/plugins/qsbooker/vendor/jms/serializer/src/JsonDeserializationVisitor.php(112): JMS\Serializer\GraphNavigator\DeserializationGraphNavigator->accept()
#4 /root/work/qsbooker/public_html/wp-content/plugins/qsbooker/vendor/jms/serializer/src/GraphNavigator/DeserializationGraphNavigator.php(140): JMS\Serializer\JsonDeserializationVisitor->visitArray()
#5 /root/work/qsbooker/public_html/wp-content/plugins/qsbooker/vendor/jms/serializer/src/JsonDeserializationVisitor.php(188): JMS\Serializer\GraphNavigator\DeserializationGraphNavigator->accept()
#6 /root/work/qsbooker/public_html/wp-content/plugins/qsbooker/vendor/jms/serializer/src/GraphNavigator/DeserializationGraphNavigator.php(214): JMS\Serializer\JsonDeserializationVisitor->visitProperty()
#7 /root/work/qsbooker/public_html/wp-content/plugins/qsbooker/vendor/jms/serializer/src/JsonDeserializationVisitor.php(112): JMS\Serializer\GraphNavigator\DeserializationGraphNavigator->accept()
#8 /root/work/qsbooker/public_html/wp-content/plugins/qsbooker/vendor/jms/serializer/src/GraphNavigator/DeserializationGraphNavigator.php(140): JMS\Serializer\JsonDeserializationVisitor->visitArray()
#9 /root/work/qsbooker/public_html/wp-content/plugins/qsbooker/vendor/jms/serializer/src/Serializer.php(252): JMS\Serializer\GraphNavigator\DeserializationGraphNavigator->accept()
#10 /root/work/qsbooker/public_html/wp-content/plugins/qsbooker/vendor/jms/serializer/src/Serializer.php(180): JMS\Serializer\Serializer->visit()
#11 /root/work/qsbooker/public_html/wp-content/plugins/qsbooker/vendor/eversign/eversign-php-sdk/sdk/Eversign/ApiRequest.php(261): JMS\Serializer\Serializer->deserialize()
#12 /root/work/qsbooker/public_html/wp-content/plugins/qsbooker/vendor/eversign/eversign-php-sdk/sdk/Eversign/Client.php(257): Eversign\ApiRequest->startRequest()
#13 /root/work/qsbooker/public_html/wp-content/plugins/qsbooker/vendor/eversign/eversign-php-sdk/sdk/Eversign/Client.php(316): Eversign\Client->getDocuments()
#14 Standard input code(7): Eversign\Client->getTemplates()
#15 {main}
  thrown in /root/work/qsbooker/public_html/wp-content/plugins/qsbooker/vendor/jms/serializer/src/GraphNavigator/DeserializationGraphNavigator.php on line 240

Script is as follows (credentials redacted):

<?php
    require_once('vendor/autoload.php');
    $client = new \Eversign\Client('xxx', 'xxx');

    $client->setSelectedBusinessById(xxx);

    print_r($client->getTemplates());
?>

To Reproduce
Steps to reproduce the behavior:

  1. Use composer to install SDK
  2. Make sure your account has a template with an image field in it.
  3. Run the above PHP script

Expected behavior
image is a field type coming from Eversign, so it should be valid and not generate an error.

Desktop (please complete the following information):

  • OS: Linux (Ubuntu 20.04)
  • Command line
@tanabi
Copy link
Author

tanabi commented Feb 14, 2023

This also fails on createDocumentFromTemplate for a template with an image field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant