Skip Navigation

[Resolved] Problem with data filter

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 6 replies, has 2 voices.

Last updated by Waqar 5 years, 11 months ago.

Assisted by: Waqar.

Author
Posts
#1199103

Hi,

I try to filter with data filter, but it doesn't work, i have tried lot of things ....

Here it is the page : hidden link

The filter is "Date de livraison"

First, i think there is a problem because when we choose a date, it doesn't appear. And when i click to Ok, the date isn't in URL.

#1199107
#1199119

Hi Romane,

Thank you for waiting.

While troubleshooting, I noticed the following error in the browser's console:
( screenshot: hidden link )


Refused to apply style from '<em><u>hidden link</u></em>' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

Your website seems to be using the "Toolset Starter Child" which loads some CSS styles dynamically from the customizer screen.

Since your website is not adding any styles through this feature, you can add the following code at the bottom of active theme's "functions.php" file, to disable this:


remove_action( 'wp_enqueue_scripts', 'ref_enqueue_customizer_css', 100 );
remove_action( 'wp_ajax_ref_dynamic_css', 'ref_dynamic_css' );
remove_action( 'wp_ajax_nopriv_ref_dynamic_css', 'ref_dynamic_css' );

Once this error from dynamic CSS loading is fixed, the date filter field should work.

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#1199309

Hello, i'am sorry, but i added your code, but it doesn't work yet 🙁

#1199919

Hi Romane,

I apologize for the mix-up.

Can you please replace it with this updated code snippet?


add_action( 'after_setup_theme', 'remove_dynamic_styles_func', 99 );
function remove_dynamic_styles_func(){
    remove_action( 'wp_enqueue_scripts', 'ref_enqueue_customizer_css', 100 );
    remove_action( 'wp_ajax_ref_dynamic_css', 'ref_dynamic_css' );
    remove_action( 'wp_ajax_nopriv_ref_dynamic_css', 'ref_dynamic_css' );
}

regards,
Waqar

#1199934

Thanks,

what i see is there is not error anymore, but it doesn't work yet.

#1200037

Hi Romane,

Thanks for the update and glad that the console error is fixed now.

To troubleshoot further around the date-picker field, I'll recommend the following steps:

1. Please temporarily disable all non-Toolset plugins and then check the date-picker field. If it gets fixed, you can start activating other plugins, one-by-one, to narrow down to a possible conflicting one.

2. You can also temporarily switch to a default WordPress theme like "Twenty Nineteen" and see if this issue is limited to the currently active "Toolset Starter" theme or any custom code in it.

Note: the "Toolset Starter" theme has been discontinued ( https://toolset.com/documentation/user-guides/toolset-starter-theme/ ) and is no longer under active development. It would be a good idea to permanently switch to a different theme that is still being updated and maintained - https://toolset.com/documentation/recommended-themes/

3. In case the issue still persists, I'll need a snapshot/clone of your website for further troubleshooting.
(it can be from this website or from another test website where the issue is reproducible)

We usually recommend the free Plugin “Duplicator” (http://wordpress.org/plugins/duplicator/) for this porpoise.

If you already know how Duplicator works, you can skip the instruction video and just send me the installer file and the zipped package you downloaded.

Duplicator Instructions:
hidden link

( note: I'll need both files and you'll probably want to use DropBox, Google Drive, or similar services, as the snapshot file will be quite big )

IMPORTANT: Remember to create or keep an admin account for me before creating the snapshot, or I won’t be able to log in. You may delete the new admin account once the snapshot has been built.

I will set your next answer as private so you can provide me with the information securely.

regards,
Waqar

#1200056
#1200338

Hi Romane,

Thank you for sharing the duplicator package.

The one that you shared, didn't include all the files, so I created and downloaded a new one.

During troubleshooting, I noticed that the "[wpv-filter-meta-html]" shortcode is incorrectly included in the "Loop Editor" section of the view "CONSEILLERS - vue liste lots":
hidden link

Since your view generates a Table, this results in invalid markup and the date-picker filter field doesn't work.

To make this view generate a valid markup, you can follow these steps:

1. In the "Loop Editor" section, remove the "[wpv-filter-meta-html]" shortcode and bring the opening code for the table inside the "[wpv-items-found]" shortcode:


[wpv-layout-start]
	[wpv-items-found]
		<table class="backgound-3-a mt-20 table table-striped" style="width:100%">
			<tr>
				<th>Nom programme</th>
				<th>Prix TTC</th>
				<th>M2</th>
				<th>Dispositif</th>
				<th>Exposition</th>
				<th>Date de livraison</th>
				<th>Typologie du lot</th>
				<th>Localisation</th>
			</tr>
			<!-- wpv-loop-start -->
				<wpv-loop>
					[wpv-post-body view_template="conseillers-bloc-programme-col12"]
				</wpv-loop>
			<!-- wpv-loop-end -->
		</table>
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]Aucin lots trouvé[/wpml-string]</strong>
	[/wpv-no-items-found]
[wpv-layout-end]

<div class="text-center">
<ul class="pagination">
	<li class="page-item">[wpv-pager-prev-page][wpml-string context="wpv-views"]Précédent[/wpml-string][/wpv-pager-prev-page]</li>
	<li class="page-item">[wpv-pager-next-page][wpml-string context="wpv-views"]Suivant[/wpml-string][/wpv-pager-next-page]</li>
</ul>
</div>

2. Include the "[wpv-filter-meta-html]" shortcode in the "Output Editor" section at the bottom:


[wpv-filter-meta-html]
[wpv-layout-meta-html]

Once these changes have been made the date-picker filter field will work.

Let me know how it goes.

regards,
Waqar