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

The page is not refreshed when editing the entries #2788

Closed
evolluti0n opened this issue Oct 24, 2018 · 6 comments
Closed

The page is not refreshed when editing the entries #2788

evolluti0n opened this issue Oct 24, 2018 · 6 comments
Labels
Bug Has PR Bug/Feature with a PR created for it.
Milestone

Comments

@evolluti0n
Copy link

Do You Need Immediate Help?

Is This A Feature Request?

  • No. It's not a feature request.

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

  • PHP 7.2.11
  • WordPress 4.9.8
  • Caldera Forms 1.7.4

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

Yes. The issue persist with all plugins disabled and with the default WordPress theme (Twenty seventeen)

What Is The Unexpected Behaviour?

I enabled the option to create a sub-menu entry viewer. This add a new link in the left sidebar in the WordPress dashboard in Caldera Forms group. If I edit entries from this link the error happens. Every time that I edited the entries for any form with this option enabled, no matters the field, and click save, a loading icon starts to spin but never ends. The information is actually updated in the form, but the page is not refreshed.
If you select the entries from Caldera Forms > Forms > form name > Entries > View > Edit, the error doesn't occur.​​ I enabled the ​​same option for other forms that I have in my installation, and got the same issue.

What PHP Errors Have You Logged While Reproducing This Bug?

16:45:13.331 vue.min.js:2 [Vue warn]: Cannot find element: #caldera-forms-clippy
te @ vue.min.js:2
Xa @ vue.min.js:1
Ka.$mount @ vue.min.js:3
Fa @ vue.min.js:1
a._init @ vue.min.js:2
Ka @ vue.min.js:1
(anonymous) @ caldera-clippy.js:45
(anonymous) @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,wp-pointer,zxcvbn-async,password-strength-meter,jquery-ui-c&load[]=ore,jquery-ui-tabs,jquery-form&ver=4.9.8:2
i @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,wp-pointer,zxcvbn-async,password-strength-meter,jquery-ui-c&load[]=ore,jquery-ui-tabs,jquery-form&ver=4.9.8:2
fireWith @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,wp-pointer,zxcvbn-async,password-strength-meter,jquery-ui-c&load[]=ore,jquery-ui-tabs,jquery-form&ver=4.9.8:2
(anonymous) @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,wp-pointer,zxcvbn-async,password-strength-meter,jquery-ui-c&load[]=ore,jquery-ui-tabs,jquery-form&ver=4.9.8:2
i @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,wp-pointer,zxcvbn-async,password-strength-meter,jquery-ui-c&load[]=ore,jquery-ui-tabs,jquery-form&ver=4.9.8:2
fireWith @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,wp-pointer,zxcvbn-async,password-strength-meter,jquery-ui-c&load[]=ore,jquery-ui-tabs,jquery-form&ver=4.9.8:2
y @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,wp-pointer,zxcvbn-async,password-strength-meter,jquery-ui-c&load[]=ore,jquery-ui-tabs,jquery-form&ver=4.9.8:4
c @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,wp-pointer,zxcvbn-async,password-strength-meter,jquery-ui-c&load[]=ore,jquery-ui-tabs,jquery-form&ver=4.9.8:4
XMLHttpRequest.send (async)
send @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,wp-pointer,zxcvbn-async,password-strength-meter,jquery-ui-c&load[]=ore,jquery-ui-tabs,jquery-form&ver=4.9.8:4
ajax @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,wp-pointer,zxcvbn-async,password-strength-meter,jquery-ui-c&load[]=ore,jquery-ui-tabs,jquery-form&ver=4.9.8:4
n.(anonymous function) @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,wp-pointer,zxcvbn-async,password-strength-meter,jquery-ui-c&load[]=ore,jquery-ui-tabs,jquery-form&ver=4.9.8:4
get @ caldera-clippy.js:80
CalderaFormsAdminClippys2.init @ caldera-clippy.js:36
(anonymous) @ admin.min.js:1
i @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,wp-pointer,zxcvbn-async,password-strength-meter,jquery-ui-c&load[]=ore,jquery-ui-tabs,jquery-form&ver=4.9.8:2
fireWith @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,wp-pointer,zxcvbn-async,password-strength-meter,jquery-ui-c&load[]=ore,jquery-ui-tabs,jquery-form&ver=4.9.8:2
ready @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,wp-pointer,zxcvbn-async,password-strength-meter,jquery-ui-c&load[]=ore,jquery-ui-tabs,jquery-form&ver=4.9.8:2
K @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-position,wp-pointer,zxcvbn-async,password-strength-meter,jquery-ui-c&load[]=ore,jquery-ui-tabs,jquery-form&ver=4.9.8:2

@Shelob9
Copy link
Collaborator

Shelob9 commented Oct 24, 2018

JavaScript error in ticket that is most likely the cause of the unexpected behaviour: 15:00:54.126 admin.min.js?ver=1.7.3:1 Uncaught ReferenceError: ajaxurl is not defined
at baldrickTriggers (admin.min.js?ver=1.7.3:1)
at HTMLDocument. (admin.min.js?ver=1.7.3:1)
at i (jquery.js?ver=1.12.4:2)
at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)
at Function.ready (jquery.js?ver=1.12.4:2)
at HTMLDocument.K (jquery.js?ver=1.12.4:2)
baldrickTriggers @ admin.min.js?ver=1.7.3:1

@Shelob9
Copy link
Collaborator

Shelob9 commented Oct 24, 2018

Short debug information: WordPress Version: 4.9.8PHP Version: 7.2.10MySQL Version: 5.7.23Caldera Forms Version: 1.7.4WP_DEBUG: 1

I tested by creating a form with the sub-menu entry viewer installed.
I went to the sub-menu entry page for this form.
I edited the entry and clicked save.
I EXPECTED the entry viewer to close and the page to refresh. INSTEAD nothing happened.

I then tested with the entry viewer in the admin page. I observed the same behaviour.

I did not get any JavaScript errors when I did this.

When I submit the form to save the entry I get the PHP warning, Deprecated: Function create_function() is deprecated in /app/wp-content/plugins/Caldera-Forms/classes/core.php on line 1437

screen shot 2018-10-24 at 11 30 17 am

@Shelob9
Copy link
Collaborator

Shelob9 commented Oct 24, 2018

TL;DR #2335

@New0 This is becoming a larger problem (PHP 7.2 making warnings about calculation fields) we may need to address faster than planned).

@Shelob9 Shelob9 added this to the 1.8.0 milestone Oct 24, 2018
@Shelob9 Shelob9 added the Bug label Oct 24, 2018
@Shelob9
Copy link
Collaborator

Shelob9 commented Nov 20, 2018

Potential solution for this and related issues -- warning is echoed, then proper JSON, which we can't parse is start ouput buffer when submission starts. Then

function caldera_forms_send_json(array $data){
	
	$buffer = ob_get_clean();
    do_action( 'caldera_forms_buffer_before_json_return', $buffer );
    echo wp_send_json($data);
}

@Shelob9
Copy link
Collaborator

Shelob9 commented Nov 21, 2018

#2822 is a PR to address this.

@Shelob9 Shelob9 added the Has PR Bug/Feature with a PR created for it. label Nov 21, 2018
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
@Shelob9
Copy link
Collaborator

Shelob9 commented Jan 22, 2019

Close via #2822

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Has PR Bug/Feature with a PR created for it.
Projects
None yet
Development

No branches or pull requests

2 participants