QR code not showing up

Author
Topic
#5598

For some reason previous post seems to be gone?

Issue is that i have created via shortcode QR code and also in php directly but it does not show up!

Php code:

echo sqr_qrcode( ‘geo’,
array(
‘latitude’ => 48.840334, ‘longitude’ => 2.345172),
1);

Bot cases nothing shows up and in chrome console i see following

kjua.min.js?ver=4.0:2 Uncaught TypeError: Cannot read properties of null (reading ‘getAttribute’)
at e (kjua.min.js?ver=4.0:2:23150)
at t.exports (kjua.min.js?ver=4.0:2:28687)
at n (kjua.min.js?ver=4.0:2:503)
at HTMLDocument.<anonymous> ((index):182:56)

js code

function(t, r) {
function e(t, r) {
return t.getAttribute(r)
}

wp version is 6.3.1

Viewing 5 replies - 1 through 5 (of 5 total)
Author
Replies
  • #5602

    Hello,

    I have tested this, and the exact code you provided works without any issues, and I get the QR code, and there are no errors in the console related to the QR Code library Kjua. Have you also tried a shortcode or widget to see if that works? Which browser you tested with? Do you have other JavaScript errors in the console?

    Milan

  • #5603

    hi

    i tried regular shortcode, same result. chrome

    kjua.min.js?ver=4.0:2 Uncaught TypeError: Cannot read properties of null (reading ‘getAttribute’)
    at e (kjua.min.js?ver=4.0:2:23150)
    at t.exports (kjua.min.js?ver=4.0:2:28687)
    at n (kjua.min.js?ver=4.0:2:503)
    at HTMLDocument.<anonymous> ((index):185:56)

    from custom theme

    # cat single.php
    <?php

    echo sqr_qrcode(‘geo’,
    array(
    ‘latitude’ => 48.840334, ‘longitude’ => 2.345172),
    1);

    echo ‘test’;
    ?>

    echo test comes fine trough. plugin is enable. default layout is there

    can you take a look (please do not download database or xml file)

    https://tinyurl.com/333jvhwb

    web is password protect right now kg8Ktcy4z8ZvYCth

    admin login:

    edmin
    xEVcBS2Egk@anHE)JT

    there is file manager plugin

    theme file testing:

    wp-content/themes/kadence-child/template-parts/content/single.php

    and shortcode is also ytest page titled

    thank you

  • #5606

    OK, I have found the problem and solution for now. I will fix it in the next version.

    But, you can use plugin normally, just use the layout with ID 2, instead of 1. Default Layout has one error, that will be resolved soon, but creating new, layout with all default settings, resolves this. I added new layout with ID 2 on your website, and changed the shortcode in the ytest page to use layout ‘2’, and it works:

    https://prxdev.firmakataloog24.ee/ytest/

    If you change layout value in the example PHP code (last argument, from 1 to 2) to:
    [scode lang=”php”]echo sqr_qrcode(‘geo’,
    array(
    ‘latitude’ => 48.840334, ‘longitude’ => 2.345172),
    2);[/scode]

    It will work.

    Milan

    • This reply was modified 3 years ago by MillaN.
  • #5607

    Version 4.1 is now available with few fixes.

  • #5608

    QR code now shows. I installed also new version. Can you please edit your reply where is website url to be private?

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.