Title: Query String Bug
Last modified: December 28, 2023

---

# Query String Bug

 *  Resolved [peterborg](https://wordpress.org/support/users/peterborg/)
 * (@peterborg)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/query-string-bug/)
 * If I leave the Content to encode in QR code empty to use the current page url
   and also add a Query String the URL is ending up malformed assuming there are
   not query strings in the url. Eg URL to encode `site.com/page?foo=bar` and set
   query string to add `abc=def` so:
 * 
   `[kaya_qrcode title_align="alignnone" querystring="abc=def" ecclevel="L" align
   ="alignnone"]`
 * 
   the link is ending up as `site.com/page?foo=bar?abc=def`
 * Can this be fixed to append query string if they already exist please?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [peterborg](https://wordpress.org/support/users/peterborg/)
 * (@peterborg)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/query-string-bug/#post-17323137)
 * Resolved it by updating the following in the _kaya-qr-code-generator > lib > 
   functions.php_ file (line 67 for me)
 *     ```wp-block-code
       $qrcodeContent .= (!empty($qrcodeQueryString)) ? esc_attr((empty(count($_GET)) ? '?' : '&' ) . $qrcodeQueryString) : '';
       ```
   
 * Would be great if this was accepted in the next update
 *  Plugin Author [Kaya Studio](https://wordpress.org/support/users/kayastudio/)
 * (@kayastudio)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/query-string-bug/#post-17347634)
 * Hello,
   Thank you for your comment and for using ‘Kaya QR Code Generator’.
 * Yes that was indeed reported to me, and it will be fixed in the next update.
 * Thank you for your help, best regards.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Query String Bug’ is closed to new replies.

 * ![](https://ps.w.org/kaya-qr-code-generator/assets/icon-256x256.png?rev=2203917)
 * [Kaya QR Code Generator](https://wordpress.org/plugins/kaya-qr-code-generator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/kaya-qr-code-generator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/kaya-qr-code-generator/)
 * [Active Topics](https://wordpress.org/support/plugin/kaya-qr-code-generator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/kaya-qr-code-generator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/kaya-qr-code-generator/reviews/)

## Tags

 * [Query String](https://wordpress.org/support/topic-tag/query-string/)

 * 2 replies
 * 2 participants
 * Last reply from: [Kaya Studio](https://wordpress.org/support/users/kayastudio/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/query-string-bug/#post-17347634)
 * Status: resolved