Skip to content
New issue

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

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

Already on GitHub? # to your account

Uncaught TypeError: Cannot read property 'data' of undefined #2448

Closed
naugustijr opened this issue Apr 19, 2018 · 12 comments
Closed

Uncaught TypeError: Cannot read property 'data' of undefined #2448

naugustijr opened this issue Apr 19, 2018 · 12 comments

Comments

@naugustijr
Copy link

What Version Of Caldera Forms, WordPress and PHP Are You Using?

Short Debug Information
WordPress Version: 4.9.5PHP Version: 5.6.35MySQL Version: 5.6.36Caldera Forms Version: 1.6.0WP_DEBUG:

Does Your Issue Persist When You Disable All Other Plugins and Switch To The Default Theme?

There seems to be a conflict with the Pods plugin (I have version 2.7.1). When I deactivate Pods, the javascript error disappears. I also have Caldera Easy Pods installed (version 1.1.8), Caldera Forms version 1.6.0.

What Is The Unexpected Behaviour?

I filled out the form and clicked Submit. Nothing happened.

What PHP Errors Have You Logged While Reproducing This Bug?

No PHP errors or notices related to this.

What JavaScript Errors Have You Seen While Reproducing This Bug?

The error below is from the Chrome console. The error comes up when entering a text in one of the form fields.

Uncaught TypeError: Cannot read property 'data' of undefined
at Object.error (ajax-core.min.js?ver=1.6.0:1)
at Object.request_error (jquery-baldrick.min.js?ver=1.6.0:1)
at c (jquery-baldrick.min.js?ver=1.6.0:1)
at Object.error (jquery-baldrick.min.js?ver=1.6.0:1)
at i (jquery.js:2)
at Object.fireWith [as rejectWith] (jquery.js:2)
at y (jquery.js:4)
at Object.abort (jquery.js:4)
at Object.request (jquery-baldrick.min.js?ver=1.6.0:1)
at c (jquery-baldrick.min.js?ver=1.6.0:1)

@naugustijr
Copy link
Author

I did more testing and realized that the error happens when I use any Caldera form.
When I open a page that contains Caldera form and pods the data returns without error in the chrome console, but when I click the search button to filter the data the error in the Chrome console immediately appears.
What do I need to do to resolve this?
Whenever I click the search button the error appears but the behavior is not always to not work. A lot of the time the click of the button brings the filtered result. Other times nothing happens on the page: neither response nor error.

@naugustijr
Copy link
Author

I deactivated Caldera Easy Pods (installed version 1.1.8) and the error was gone, but I lost the functionality of the page!

@naugustijr
Copy link
Author

Error on Firefox:

TypeError: b.jqxhr.responseJSON is undefined[Learn More]
ajax-core.min.js:1:2228
error
http://parisnaamerica.org/wp-content/plugins/caldera-forms/assets/build/js/ajax-core.min.js:1:2228
request_error
http://parisnaamerica.org/wp-content/plugins/caldera-forms/assets/build/js/jquery-baldrick.min.js:1:1692
c
http://parisnaamerica.org/wp-content/plugins/caldera-forms/assets/build/js/jquery-baldrick.min.js:1:2048
error
http://parisnaamerica.org/wp-content/plugins/caldera-forms/assets/build/js/jquery-baldrick.min.js:1:9877
i
http://parisnaamerica.org/wp-includes/js/jquery/jquery.js:2:27444
fireWith
http://parisnaamerica.org/wp-includes/js/jquery/jquery.js:2:28213
y
http://parisnaamerica.org/wp-includes/js/jquery/jquery.js:4:22744
abort
http://parisnaamerica.org/wp-includes/js/jquery/jquery.js:4:20559
request
http://parisnaamerica.org/wp-content/plugins/caldera-forms/assets/build/js/jquery-baldrick.min.js:1:1372
c
http://parisnaamerica.org/wp-content/plugins/caldera-forms/assets/build/js/jquery-baldrick.min.js:1:2048
a.fn.baldrick/</<
http://parisnaamerica.org/wp-content/plugins/caldera-forms/assets/build/js/jquery-baldrick.min.js:1:10191
dispatch
http://parisnaamerica.org/wp-includes/js/jquery/jquery.js:3:12392
add/r.handle
http://parisnaamerica.org/wp-includes/js/jquery/jquery.js:3:9156
trigger
http://parisnaamerica.org/wp-includes/js/jquery/jquery.js:3:11571
a.event.trigger
http://parisnaamerica.org/wp-includes/js/jquery/jquery-migrate.min.js:2:8273
trigger/<
http://parisnaamerica.org/wp-includes/js/jquery/jquery.js:3:18983
each
http://parisnaamerica.org/wp-includes/js/jquery/jquery.js:2:2879
each
http://parisnaamerica.org/wp-includes/js/jquery/jquery.js:2:844
trigger
http://parisnaamerica.org/wp-includes/js/jquery/jquery.js:3:18962
init_search<
http://parisnaamerica.org/search/:461:8

@naugustijr
Copy link
Author

#1157

@naugustijr
Copy link
Author

#2369

@naugustijr
Copy link
Author

@naugustijr
Copy link
Author

I have update Caldera Forms to version 1.6.1 and the error persists.

@0xLBF
Copy link

0xLBF commented May 22, 2018

I had some JavaScript errors, but in the Pods Template editor, not when submitting forms. So I'm not sure if the referenced patch fixes this.

@naugustijr
Copy link
Author

I'll try and return the result

@markusweigelt
Copy link

markusweigelt commented Jun 8, 2018

Is WP_DEBUG true? Cause when you get ajax reponse of submitted form and there are notices or warnings in response the json data is not parsable and so data object will be undefined.

@Shelob9
Copy link
Collaborator

Shelob9 commented Nov 21, 2018

I am going to close this in favor of #2820 which will address the root issue.

@Shelob9
Copy link
Collaborator

Shelob9 commented Nov 21, 2018

Will be fixed via #2822

Shelob9 pushed a commit that referenced this issue Dec 14, 2018
* develop:
  During form submission, start buffer, then flush it. #2820 and #2448 and #2788
  Set window.cf2 if not an object #2821
  #2814 schedule deletes in cf2 fiel fields and cleanup that handler a bit
  #2814 schedule deletes
  #2814 handle deleting directory if empty
  Only try to delete file, if it exists #2814
  Test to prove that the delete file job will make an uncaught exception in some cases #2814
  Make new job for deleting tests work #2814
  New job for deleting files #2814 - failing tests
  Make new utility methods needed for #2814 and #2794 work
  Failing tests for utility methods needed for #2814  and #2794
  #2814 rm dead code and add inline docs to existing delete job

# Conflicts:
#	cf2/functions.php
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants