Giter Club home page Giter Club logo

gatsby-source-gravityforms's Introduction

Developer Portfolio for Robert Marshall

gatsby-source-gravityforms's People

Contributors

bamadesigner avatar good3n avatar hu0p avatar michaelpanik avatar moonmeister avatar robmarshall avatar silencerweb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gatsby-source-gravityforms's Issues

Can't query field "content"

Hey Rob,

Closed our other issue, and right now chewing on the GraphiQL and curious why the field "content" is missing. The rest of the query validates with the exception of the field for "content".

Ideas?

Cheers,

Travis

Field type conflicts

Hi there,

I recently converted an old WP site to Gatsby and encountered field type conflicts when I imported old forms and mixed them with new ones, causing the plugin to omit those fields entirely.

Apparently GF changed the field types over time (i.e. field id was a string value at some point and now it's an integer). I contacted GF support and they've helped me out super quickly and I thought you want to mention this solution in your documentation in case anyone else is facing the same issues.

This goes into your functions.php:

add_filter( 'gform_form_post_get_meta', function ( $form ) {
	if ( defined( 'REST_REQUEST' ) && REST_REQUEST ) {
		foreach ( $form['fields'] as &$field ) {
			if ( isset( $field->id ) ) {
				$field->id = (int)$field->id;
			}
		}
	}

	return $form;
} );

403 error status

I'm trying to set up gatsby-source-gravityforms but get 403 error status but can't understand why.

Configurations I tried:

    {
      resolve: 'gatsby-source-gravityforms',
      options: {
        baseUrl: `${process.env.WORDPRESS_PROTOCOL}://${process.env.WORDPRESS_BASE_URL}`,
        api: {
          key: process.env.GRAVITY_FORMS_KEY,
          secret: process.env.GRAVITY_FORMS_SECRET,
        },
      },
    },
    {
      resolve: 'gatsby-source-gravityforms',
      options: {
        baseUrl: `${process.env.WORDPRESS_PROTOCOL}://${process.env.WORDPRESS_BASE_URL}`,
        api: {
          key: process.env.GRAVITY_FORMS_KEY,
          secret: process.env.GRAVITY_FORMS_SECRET,
        },
        basicAuth: {
          username: process.env.WORDPRESS_USER,
          password: process.env.WORDPRESS_PASSWORD,
        },
      },
    },

Access to API is enabled, the key is generated correctly and added to .env:

image

Error in the terminal:

image

gatsby-source-gravityforms version is 1.0.13.

Any ideas why it works like that? And why is expires value is 'Wed, 11 Jan 1984 05:00:00 GMT'?

Allocate confirmations to form

Confirmations are currently allocated to all forms, and the user needs to loop through to find the confirmation with data.

It would be better to have the confirmations added as an array, and for the correct forms. This way they can be implemented quickly.

Improve error message for using wrong oauth_timestamp "Error 401 from GravityForms API"

One of our developers had this error come up. It turns out it was caused by having an inaccurate time set in Windows 10.

I couldn't find anyone else with this error but I looked through the axios.js file and saw you are using Date().getTime() to send the oauth_timestamp. After he synced his time in Windows the error went away.

function getCurrentTimestamp() {

I'm not sure if WP or the GF API sends back anything about a wrong oauth_timestamp, but if it does it would be super helpful to show this in the terminal.

At the very least I thought it would be good to post about it in case anyone else runs into this error.

 Error: Error 401 from GravityForms API
  - axios.js:110 apiErrorHandler
   /[gatsby-source-gravityforms]/utils/axios.js:110:71
  - axios.js:33 getForms
    /[gatsby-source-gravityforms]/utils/axios.js:33:5
  - task_queues.js:93 processTicksAndRejections
    internal/process/task_queues.js:93:5
  - axios.js:72 getFormsAndFields
    /[gatsby-source-gravityforms]/utils/axios.js:72:18
  - gatsby-node.js:63 Object.exports.sourceNodes
    /[gatsby-source-gravityforms]/gatsby-node.js:63:18
  - api-runner-node.js:434 runAPI
    /[gatsby]/src/utils/api-runner-node.js:434:16

Basic Auth

Basic auth needs adding, so backend site can have another layer of security.

Details to be added in Gatsby config. Append to the front of REST API URLs

Conflicting field types in your data

Looks like there's an issue with the schema here. I have reason to believe this is causing issues with my gatsby cloud builds, but I thought I'd reach out first. Thanks!

If you have explicitly defined a type for those fields, you can safely ignore this warning message.
Otherwise, Gatsby will omit those fields from the GraphQL schema.

If you know all field types in advance, the best strategy is to explicitly define them
with the `createTypes` action, and skip inference with the `@dontInfer` directive.
See https://www.gatsbyjs.org/docs/actions/#createTypes
GF__Form.confirmations.pageId:
 - type: number
   value: 0
 - type: string
   value: ''
GF__Form.formFields.rangeMin:
 - type: boolean
   value: false
 - type: string
   value: ''
GF__Form.formFields.rangeMax:
 - type: boolean
   value: false
 - type: string
   value: ''

Config Error

Howdy,

I'm building a proof of concept for a client, and we'll be leaning pretty heavily on Gravity Forms. Your plugin has been implemented, but on build there's an error saying, "Cannot read property 'split' of undefined".

Config options are set according to your documentation, so a little lost as to what the "split" is and why it's creating conflict.

Thanks in advance.

Error 401 from Gravity Forms API - provided signature does not match

I'm having an issue during builds on Gatsby Cloud where the build fails while trying to fetch the form data. This error does not occur during a gatsby-develop. Only during a full build.

Here's the output from Gatsby:

verbose 121.205364957 Fetching form ids

16:30:30 PM:
ERROR Request was made, but there was an issue Error 401 from GravityForms API

16:30:30 PM:
  Error: Error 401 from GravityForms API

16:30:30 PM:
  

16:30:30 PM:
  - axios.js:110 apiErrorHandler

16:30:30 PM:
16:30:30 PM:
  

16:30:30 PM:
    [www]/[gatsby-source-gravityforms]/utils/axios.js:110:71

16:30:30 PM:
  - axios.js:33 getForms

16:30:30 PM:
  - runMicrotasks

16:30:30 PM:
    internal/process/task_queues.js:97:5

16:30:30 PM:
    [www]/[gatsby-source-gravityforms]/utils/axios.js:33:5

16:30:30 PM:
  - task_queues.js:97 processTicksAndRejections

16:30:30 PM:
  

16:30:30 PM:
  

16:30:30 PM:
  

16:30:30 PM:
16:30:30 PM:
not finished source and transform nodes - 113.700s

Here's the Gravity Forms API log output:

2021-06-02 16:32:59.244479 - ERROR --> GF_REST_Authentication::set_error(): {"errors":{"gform_rest_authentication_error":["Invalid signature - provided signature does not match."]},"error_data":{"gform_rest_authentication_error":{"status":401}}} 

Full example

Would it be possible to get a full example? Basically just an implementation that shows the proper parsing of the choices and the proper way of submitting the form etc. Been failing at the choices for a while now so figured a full blown example would be more helpful in general than just my particular issues.

Error: Cannot find module './0AuthParameters'

Error trying to deploy to Netlify

5:27:03 PM: error Cannot find module './0AuthParameters'
5:27:03 PM: Error in "/opt/build/repo/node_modules/gatsby-source-gravityforms/gatsby-node.js": Cannot find module './0AuthParameters'
5:27:03 PM: See our docs page for more info on this error: https://gatsby.dev/issue-how-to
5:27:03 PM: 
5:27:03 PM:   Error: Cannot find module './0AuthParameters'
  • In: /utils/axios.js
  • Line 20 is const _require3 = require('./0AuthParameters'),
  • But the filename is 0authParameters.js

Get conditionalLogic for formFields?

Right now can't see how to get conditionalLogic for formFields :(

Pretty sure it does exist, I checked it in docs

I wouldn't even mind helping with PR to speed up the process if you wouldn't mind helping me with pointing out where to do it :)

Minor edits to your docs

You reference gatsby-gravityforms-components (plural) several times in your readme, but It looks like your package is singular npm i gatsby-gravityforms-component

Thank you for this project! I'm trying to implement it now on a project, hopefully this will work otherwise I'll need to explore Netlify forms. If i had the luxury of time I'd help you out with this!

Add build steps

There are currently installation procedures that appear to suggest that using this plugin is as easy as installing the package and adding the config to gatsby-config.js. However, the presence of the src/ folder and .babelrc suggest a transpile step.

Can you elaborate on those?

Is there a way to get Site Key for reCAPTCHA?

Because right now fetching reCAPTCHA makes no sense if you can't get Site Key. Yes, you can store it in .env variables but what's the point if it already exists in Gravity Forms settings? Or there is no way to get it?

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.