programmin
Forum Replies Created
-
It happens anywhere a form is on the page – even your example demo.
Loading time can be slow (at half MB of js), but the chart above is javascript CPU profile.
No, I didn’t notice high cpu, just that large chunk in the chart.
Thanks for checking!
Just thought I would mention this does happen on your example site as well. This is a JS CPU profile connected to a Samsung tablet, on which this particular form takes over 11 seconds of CPU time!
Well to answer my own question… looks like there is an upgrade option in the settings 🙂
Looks like the ids change on this upgrade? That could cause problems…
Ninja-forms in general does not work when grabbed from AJAX. You first of all have to enqueue_script and styles into the page, which doesn’t run on an admin-ajax.php request.
Second, even if you do manually add those enqueues there is some tricky javascript loading up the form, and it may not show the form on some setups.
https://wordpress.org/support/topic/no-way-to-call-re-render-forms-after-ajax-loads-a-form/Has there been any progress on possibility of reliably bringing in any Ninja form via AJAX into the page without reloading everything? I even ran the front-end-deps.js script after, and it seems to make no difference.
The new NinjaForms() object and other objects that initialize stuff, seem to be private scope in that JS so there is no way to call it apparently.
It’s on any form. On desktop this looks like “Timer Fired (almond.js:387)” calling “Function Call (front-end.js?ver=3.0.34:1)”. Front-end.js and various constructor methods are taking 54ms or more on super fast desktop, and much much slower on mobile.
Are you saying front-end.js should not be loading when viewing the form frontend (non-administrator)?
Forum: Plugins
In reply to: [Media from FTP] Breaks links! Do not use.It actually changes existing urls though! and that organize-by-month-and-year is default WordPress behavior. How can it be a good idea for existing urls to change using this plugin??
I’m having a hard time making a minimal testcase on local setup, but yes when enabled it changes the WP_Query(), possibly with a conflict with other plugin.
I can’t seem to find that code but I did notice one part of the code calls a set_cache while query is filtered, possibly related?
add_filter( 'posts_where' , 'FrmFormActionsController::limit_by_type' ); $query = self::action_args( $form_id, $limit ); $query['post_status'] = 'any'; $query['suppress_filters'] = false; $actions = FrmAppHelper::check_cache( serialize( $query ) . '_type_' . $type, 'frm_actions', $query, 'get_posts' );I believe it was happening all the time, I don’t believe I had a scan running at the time.
Thanks for the reply. As I mentioned earlier this is a PHP out of memory error, that happens when Wordfence is enabled. When PHP hits out of memory fatal error the ending part of the page is not echo’d out and the MCE editor breaks, no JS error in the console.
The error triggered is showing it hit 134mb memory limit, around meta.php:838
Did wf start consuming massively more memory in recent update…?Just checking up on this, was there recently any improvement or way that ajax-loaded content can have Ninja forms?
Thanks in advance 🙂
Replacing that function, seems to make it better on an affected site.
I could check the latest version with that function replaced, but unless I am missing something there should not be a case where something in site_uri (the actual url of the /wp-content, uploads, /wp-admin/) would be something that would be recorded? All pages should contain home_url/nameofthepage or whatever permalink setting is set, right?
I have to wonder why it was looking at site_url in the first place instead of home_url, https://codex.wordpress.org/Function_Reference/home_url
Site_url is wherever the wp files happen to live, home_url will be the root of the visible site pages.