Incorrect shared url because it lacks query string
-
Hi,
I use shortcode to display sassy social share with floating mode in my page.
[Sassy_Social_Share type=”floating”]
my page URL is:
https://mysite.dev/event-detail-page/?event=event-namewhen I click on a button to share my page, I found the shared url is:
https://mysite.dev/event-detail-page/it lacks query string.
I checked the code of sassy social shared and found that it is not prepared for attaching query string if it exists.
so I changed the code as following to make it works.
/includes/class-sassy-social-share-widgets.php
line 287, I add following code// attach query string if ( isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] ) { $sharing_url .= '?'. $_SERVER['QUERY_STRING']; }
/includes/class-sassy-social-share-shortcodes.php
line 81, I add following code// attach query string if ( isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] ) { $target_url .= '?'. $_SERVER['QUERY_STRING']; }
not sure if it’s the best solution, but it resolves my issue rite now.
thanks for reading and hopefully receiving response from you all.
- The topic ‘Incorrect shared url because it lacks query string’ is closed to new replies.