bmlt-enabled / crouton

BMLT Tabbed-based view for Wordpress https://wordpress.org/plugins/crouton/ and any website. https://github.com/bmlt-enabled/crouton/tree/master/croutonjs
GNU General Public License v2.0
5 stars 14 forks source link

Recurse Service Bodies checkbox has no effect #275

Open tempsaint opened 4 years ago

tempsaint commented 4 years ago

Tested on ctna.org and sandbox.btml.app

Service Body is set for the Region. The Recurse Service Bodies checkbox is unchecked.

crouton implementations on both sites still display all meetings in all Areas in the Region even though none of the meetings are specified as being in the "Connecticut Region"

Expected behavior I expected to see NO meetings displayed based on the explanation Patrick provided that "When checked it will display all meetings under that service body regardless off hierarchy. So if you [have] a region checked and didn't have that check box checked and no meetings explicitly set to the region you would get 0 meetings returned. If you check the box you would then get all meetings for areas within the region"

Screenshots If applicable, add screenshots to help explain your problem. image

image

dgershman commented 4 years ago

What is your shortcode on this page?

On Mon, Aug 17, 2020 at 10:57 AM Adam Hechler notifications@github.com wrote:

Tested on ctna.org and sandbox.btml.app

  • On ctna.org - root server of ctna.org/main_server

  • On sandbox - root server has Use Tomato checked.

Service Body is set for the Region. The Recurse Service Bodies checkbox is unchecked.

crouton implementations on both sites still display all meetings in all Areas in the Region even though none of the meetings are specified as being in the "Connecticut Region"

Expected behavior

I expected to see NO meetings displayed based on the explanation Patrick provided that "When checked it will display all meetings under that service body regardless off hierarchy. So if you [have] a region checked and didn't have that check box checked and no meetings explicitly set to the region you would get 0 meetings returned. If you check the box you would then get all meetings for areas within the region"

Screenshots

If applicable, add screenshots to help explain your problem.

[image: image] https://user-images.githubusercontent.com/38324357/90410335-3d750d00-e078-11ea-91d0-9c521c6fc55c.png

[image: image] https://user-images.githubusercontent.com/38324357/90410419-554c9100-e078-11ea-8893-c5a772a24cd9.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bmlt-enabled/crouton/issues/275, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOD3OZVQNF4XUBKPXXGBK3SBFAMLANCNFSM4QBXOJZA .

tempsaint commented 4 years ago

Shortcode on the page I screenshot is: [bmlt_tabs custom_query="&formats%5B%5D=-57&formats%5B%5D=-58"] Shortcode on the page on sandbox.bmlt.app/crouton-demo is just: [bmlt_tabs]

pjaudiomv commented 4 years ago

The custom query attribute over rides the service body and recursive box from settings page.

tempsaint commented 4 years ago

The custom query attribute over rides the service body and recursive box from settings page.

That's good to know. So, what service body gets used if you add a custom query? Or does it only override the "Recurse..." box and still use the "Default Service Body"? Because if the custom query overrides the Service Body settings altogether, then using Tomato as the root server would pull meetings from everywhere?

We want to include these idiosyncrasies in the documentation.

dgershman commented 4 years ago

You are not selecting a service body at all with your custom query. You are saying that you want all meetings without formats 57 and 58. Custom query overrides all other capability. If you want to include a specific set of service body IDs or recurse, those need to be included as part of the query.

You can always drop down into the developer tools in your browser to see the actual query that gets executed.

Danny Gershman - Chat @ Spike [n746s]

On August 17, 2020 at 15:44 GMT, Adam Hechler notifications@github.com wrote:

The custom query attribute over rides the service body and recursive box from settings page.

That's good to know. So, what service body gets used if you add a custom query? Or does it only override the "Recurse..." box and still use the "Default Service Body"? Because if the custom query overrides the Service Body settings altogether, then using Tomato as the root server would pull meetings from everywhere?

We want to include these idiosyncrasies in the documentation.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

tempsaint commented 4 years ago

You are not selecting a service body at all with your custom query. You are saying that you want all meetings without formats 57 and 58. Custom query overrides all other capability. If you want to include a specific set of service body IDs or recurse, those need to be included as part of the query. You can always drop down into the developer tools in your browser to see the actual query that gets executed. Danny Gershman - Chat @ Spike [n746s]

Okay... for ctna.org that's fine. We have a custom query that's overriding the "Recurse..." box. What about on sandbox.btml.org. There's no custom query being used. And Tomato is being used. Connecticut Region is selected as the Default Service Body. Shortcode is [btml_tabs]... that's it. All meetings in the Areas in Connecticut Region are being displayed in crouton implementation.

dgershman commented 4 years ago

It appears as though recurse_service_bodies is being passed down.

Danny Gershman - Chat @ Spike [n74z3]

On August 17, 2020 at 15:58 GMT, Adam Hechler notifications@github.com wrote:

You are not selecting a service body at all with your custom query. You are saying that you want all meetings without formats 57 and 58. Custom query overrides all other capability. If you want to include a specific set of service body IDs or recurse, those need to be included as part of the query. You can always drop down into the developer tools in your browser to see the actual query that gets executed. Danny Gershman - Chat @ Spike [n746s]

Okay... for ctna.org that's fine. What about on sandbox.btml.org. There's no custom query being used. And Tomato is being used. Connecticut Region is selected as the Default Service Body. Shortcode is [btml_tabs]... that's it. All meetings in the Areas in Connecticut Region are being displayed in crouton implementation.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

tempsaint commented 4 years ago

It appears as though recurse_service_bodies is being passed down.

So checking or unchecking the box has no effect?

dgershman commented 4 years ago

What are the crouton settings on the admin page?

Danny Gershman - Chat @ Spike [n7apx]

On August 17, 2020 at 18:05 GMT, Adam Hechler notifications@github.com wrote:

It appears as though recurse_service_bodies is being passed down.

So checking or unchecking the box has no effect?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

tempsaint commented 4 years ago

I only chose Connecticut Region because I know that all of the meetings are in Areas and none are in the Region (in root server).

image

dgershman commented 4 years ago

Able to repro

dgershman commented 4 years ago

This issue occurs because there is a backward-compatible feature condition. I don't recall why this exists.

https://github.com/bmlt-enabled/crouton/blob/master/crouton.php#L737-L739

dgershman commented 4 years ago

Seems to be related to https://github.com/bmlt-enabled/crouton/issues/121

tempsaint commented 4 years ago

BTW - I just tested this using Tomato as the root server and the Central Atlantic Region as the service body. Everything worked as expected. Only 2 meetings showed up when I did NOT check the Recurse Service Bodies checkbox but 542 meetings showed up when I did check the box. So that legacy force recurse you mentioned above is the issue because when I chose Connecticut Region the parent_id was 0. With Central Atlantic Region, the parent_id was 108.

image

dgershman commented 4 years ago

To clarify Service Body Parent ID = 0 then Recurse Service Bodies is automatically enabled regardless of the checkbox.