Skip Navigation

[Resolved] js error with my theme

This support ticket is created 5 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 21 replies, has 2 voices.

Last updated by martinP-13 5 years, 11 months ago.

Assisted by: Nigel.

Author
Posts
#1180896

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I'm not sure what you mean by your last comment.

Our developers identified the issue, and determined that the problem is with the theme code.

We will pass on our findings to the authors of the theme so that they can fix it.

I thought you might be able to expedite that by getting the best contact details if you are a customer of theirs and have support available, but it does not matter, I think our WPML developers likely have a contact we can use, so we will pursue that.

I will leave this as escalated, and if we get confirmation that they are able to apply a fix with a theme update, I will update here.

#1180912

i no longer pay for updates. they never address issues they are a terrible company.the support for appthemes comes from its own user!! there is an update to 3.6.1 that update includes updates to the frame work , can you give me details of the problem and i can try get a developer to sort it for me, or ill take a look myself

#1181347

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

The problem arises with ClassiPress enqueuing its scripts where they are not required (i.e. on the Toolset edit screens).

You should be able to fix it with the following:

// Make sure this runs after ClassiPress has enqueued its 'validate' scripts.
if ( $pagenow == 'admin.php' && ! empty( $_GET['page'] ) && 'wpcf-edit-type' === $_GET['page'] ) {
        wp_dequeue_script( 'validate' );
        wp_dequeue_script( 'validate-lang' );
}

As the comment says, you'll need that code to run after ClassiPress has enqueued its scripts.

The 'wp' hook would probably be a suitably late place to trigger this code:

https://codex.wordpress.org/Plugin_API/Action_Reference/wp

#1181719

many thanks nigel, like an idiot i replied to the email!!,
thats great , just to save me spending days trying to figure out , which file would i put that code in ,and is that the whole code i would need?

many many thanks nigel i really appreciate your help
martin

#1182151

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I tested it and had to tweak the suggested code slightly, this should work:

function tssupp_classipress() {
	global $pagenow;
	if ($pagenow == 'admin.php' && !empty($_GET['page']) && 'wpcf-edit-type' === $_GET['page']) {
		wp_dequeue_script('validate');
		wp_dequeue_script('validate-lang');
	}
}
add_action('admin_enqueue_scripts', 'tssupp_classipress', 11);
#1183167

worked like a charm , thank you nigel

#1183168

My issue is resolved now. Thank you!