kasparsd / widget-context-wporg

Widget Context for WordPress
https://widgetcontext.com
Other
42 stars 13 forks source link

Query string causes URL targeting to fail. #14

Closed jaredatch closed 6 years ago

jaredatch commented 9 years ago

I have a site with this page: acme-corp.com/campaigns/

This page contains various links, which filter the content of the page in this format: acme-corp.com/campaigns/?cc=automotive

Targeting by URL seems to work correctly for the first URL (this is a normal WordPress page), however when any query string is in the URL the widget will not show.

So acme-corm.com/campaigns/?foobar will not show the widget either.

I am using wildcards, so I'm not sure why this isn't working. I've tried all of the following:

campaigns/
campaigns/*
campaigns/?cc=*

This has to be a bug I'm assuming. Any insight would be appreciated.

reneneee commented 9 years ago

This bug also makes URL targeting useless on mutlilingual site using WPML, as language by default is chosen by GET parameter, e.g. "http://example.com/page/?lang=es"

kontrollanten commented 9 years ago

I'm having a problem with this too. Any news about it?

jkeasley commented 6 years ago

Is this issue resolved in version 1.1.0, as I am still seeing this behaviour when handling urls with ?utm query strings

kasparsd commented 6 years ago

@jkeasley I just confirmed that it isn't working also on this demo page where there should be a Meta widget in the footer of the sidebar.

Re-opening.

kasparsd commented 6 years ago

@jkeasley Actually, the settings were missing the wildcard entry to capture all query variables. I added widget-context/hello-world?* to the list of URLs and now it works as expected.

Here is the full contents of the Target by URL field:

widget-context/hello-world
widget-context/hello-world?*