Skip Navigation

[Resolved] Passing arguments for views filter does not work

This thread is resolved. Here is a description of the problem and solution.

Problem:
filter view by checkboxes filed

Solution:
Checkboxes fields are special fields and Types stored it as a serialize array. That is why its not possible to filter the checkboxes field.

I suggest you should change your checkboexes field to custom taxonomy and then filter your view by taxonomy.

You can find proposed solution, in this case, with the following reply
https://toolset.com/forums/topic/passing-arguments-for-views-filter-does-not-work/#post-919381

Relevant Documentation:
=> https://toolset.com/documentation/user-guides/filtering-views-by-taxonomy/

This support ticket is created 6 years, 5 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 9 replies, has 2 voices.

Last updated by hannesU-2 6 years, 5 months ago.

Assisted by: Minesh.

Author
Posts
#919035

I am trying to: pass a number when calling a three times the same view with different arguments (ausstrahlungstag=".."):
<wpv-loop>
[wpv-view name='auflistung-der-filme-eines-tages' ausstrahlungstag='1']<br/>

[wpv-view name='auflistung-der-filme-eines-tages' ausstrahlungstag='2']<br/>

[wpv-view name='auflistung-der-filme-eines-tages' ausstrahlungstag='3']<br/>

</wpv-loop>

In the filter section of the view "auflistung-der-filme-eines-tages" i am filtering like this:
Elemente mit Feld auswählen:
ausstrahlungstag ist ein/e String gleich VIEW_PARAM(ausstrahlungstag)

Link to a page where the issue can be seen:
hidden link

I expected to see:
in the first loop only articles (custom post type "filme") where the passed argument 1 ist matching the postfield "ausstrahlungstag" with the number 1.
in the second loop only articles where the passed argument 2 ist matching the postfield "ausstrahlungstag" with the number 2.

Instead, I got:
all results in all views. for example ausstrahlungstag=1 in all three views.

What is really funny is that it worked at the beginning, and all of the sudden it stoppedworking.

Can you help, please?

Thanks
Hannes

#919257

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - could you please share problem URL where you are displaying the view and access details so I can check whats going wrong with your current setup.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#919308

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

So - as I understand, you want to display results:

Under "Freitag, 10. November" = posts with ausstrahlungstag='1'?
Under label "Samstag, 11. November = posts with ausstrahlungstag='2'? and so on..?

#919309

yes, excactly

#919317

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - I tried to edit wp-config.php file but when I try to upload the change its throwing error - it seems I do not have permission to change and upload the file:

Error:	Critical file transfer error

I suspect one thing here - could you please check that mbstring module is active or not on your server. If its not activated - could you please enable it.

If you do not know how to activate it - please contact your server's hosting authority and ask them to activate mbstring module.

More info:
=> hidden link

If you are using cpanel please check this link:
=> hidden link

#919325

Sorry. My bad. rights were wrong. you now have ftp permission for the wp folder.

#919326

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thanks - but could you please check for mbstring module.

Could you please check that mbstring module is active or not on your server. If its not activated - could you please enable it.

If you do not know how to activate it - please contact your server's hosting authority and ask them to activate mbstring module.

More info:
=> hidden link

If you are using cpanel please check this link:
=> hidden link

#919328

Hi.
I just talked to allinkl.com service.
They haven´t heard of that mbstring module.
So i cannot activate that one.
Is that bad?

#919381

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - the thing is that, checkboxes fields are special fields and Types stored it as a serialize array. That is why its not possible to filter the checkboxes field.

I suggest you should change your checkboexes field to custom taxonomy and then filter your view by taxonomy.
=> https://toolset.com/documentation/user-guides/filtering-views-by-taxonomy/

#920794

Hmm. Tried to fix it another way but i am having a new prtoblem. Will open another ticket for that.