• Hello,

    I’m using a theme called Bellevue from themeforest which comes with WP booking system but from the time of purchase i’m facing a problem with calendar for which which i did contact theme developer but unable to get correct solution yet so maybe if you can help will be nice.

    Problem was lets say we create a new Calendar in admin panel after that i selected Start date 01 Jan, end date 10 Jan, Status to Booked and click Apply Changes it works and all dates gets booked, after that if i will select any other date to change its status to booked or available then it will not work this works only once and if i try to change again it just throws error in console:

    Uncaught SyntaxError: Unexpected number in JSON at position 1
    at JSON.parse (<anonymous>)
    at HTMLInputElement.<anonymous> (wpbs-admin.min.js:1)
    at HTMLDocument.dispatch (load-scripts.php:3)
    at HTMLDocument.r.handle (load-scripts.php:3)

    (anonymous) @ wpbs-admin.min.js:1
    dispatch @ load-scripts.php:3
    r.handle @ load-scripts.php:3

    VM1941:1

    So is there anything you can suggest for fixing?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Same issue here.

    
    wpbs(document).on("click", "#calendarBatchUpdate", function(a) {
            a.preventDefault();
            var s = wpbs(".wpbs-calendar-data").attr("data-info");
            s = s ? JSON.parse(s) : {}; // <-- this line errors
            ...
    

    This is the content of the data-info attribute.

    
    {--DOUBLEQUOTE--2018--DOUBLEQUOTE--:{--DOUBLEQUOTE--1--DOUBLEQUOTE--:{--DOUBLEQUOTE--22--DOUBLEQUOTE--:--DOUBLEQUOTE--1--DOUBLEQUOTE--,--DOUBLEQUOTE--23--DOUBLEQUOTE--:--DOUBLEQUOTE--1--DOUBLEQUOTE--,--DOUBLEQUOTE--24--DOUBLEQUOTE--:--DOUBLEQUOTE--1--DOUBLEQUOTE--,--DOUBLEQUOTE--25--DOUBLEQUOTE--:--DOUBLEQUOTE--1--DOUBLEQUOTE--,--DOUBLEQUOTE--26--DOUBLEQUOTE--:--DOUBLEQUOTE--1--DOUBLEQUOTE--,--DOUBLEQUOTE--description-22--DOUBLEQUOTE--:--DOUBLEQUOTE--door Danny--DOUBLEQUOTE--,--DOUBLEQUOTE--description-23--DOUBLEQUOTE--:--DOUBLEQUOTE--door Danny--DOUBLEQUOTE--,--DOUBLEQUOTE--description-24--DOUBLEQUOTE--:--DOUBLEQUOTE--door Danny--DOUBLEQUOTE--,--DOUBLEQUOTE--description-25--DOUBLEQUOTE--:--DOUBLEQUOTE--door Danny--DOUBLEQUOTE--,--DOUBLEQUOTE--description-26--DOUBLEQUOTE--:--DOUBLEQUOTE--door Danny--DOUBLEQUOTE--},--DOUBLEQUOTE--2--DOUBLEQUOTE--:{--DOUBLEQUOTE--1--DOUBLEQUOTE--:--DOUBLEQUOTE--1--DOUBLEQUOTE--,--DOUBLEQUOTE--2--DOUBLEQUOTE--:--DOUBLEQUOTE--1--DOUBLEQUOTE--,--DOUBLEQUOTE--3--DOUBLEQUOTE--:--DOUBLEQUOTE--1--DOUBLEQUOTE--,--DOUBLEQUOTE--4--DOUBLEQUOTE--:--DOUBLEQUOTE--1--DOUBLEQUOTE--,--DOUBLEQUOTE--5--DOUBLEQUOTE--:--DOUBLEQUOTE--1--DOUBLEQUOTE--,--DOUBLEQUOTE--6--DOUBLEQUOTE--:--DOUBLEQUOTE--1--DOUBLEQUOTE--,--DOUBLEQUOTE--7--DOUBLEQUOTE--:--DOUBLEQUOTE--1--DOUBLEQUOTE--,--DOUBLEQUOTE--8--DOUBLEQUOTE--:--DOUBLEQUOTE--1--DOUBLEQUOTE--,--DOUBLEQUOTE--description-1--DOUBLEQUOTE--:--DOUBLEQUOTE--geboekt door Erik--DOUBLEQUOTE--,--DOUBLEQUOTE--description-2--DOUBLEQUOTE--:--DOUBLEQUOTE--geboekt door Erik--DOUBLEQUOTE--,--DOUBLEQUOTE--description-3--DOUBLEQUOTE--:--DOUBLEQUOTE--geboekt door Erik--DOUBLEQUOTE--,--DOUBLEQUOTE--description-4--DOUBLEQUOTE--:--DOUBLEQUOTE--geboekt door Erik--DOUBLEQUOTE--,--DOUBLEQUOTE--description-5--DOUBLEQUOTE--:--DOUBLEQUOTE--geboekt door Erik--DOUBLEQUOTE--,--DOUBLEQUOTE--description-6--DOUBLEQUOTE--:--DOUBLEQUOTE--geboekt door Erik--DOUBLEQUOTE--,--DOUBLEQUOTE--description-7--DOUBLEQUOTE--:--DOUBLEQUOTE--geboekt door Erik--DOUBLEQUOTE--,--DOUBLEQUOTE--description-8--DOUBLEQUOTE--:--DOUBLEQUOTE--geboekt door Erik--DOUBLEQUOTE--}}}
    

    So it looks like you are somehow applying your own encoding on the attribute, which messes up the call to JSON.parse.

    Thanks for reporting. Looking into this now…

    Thanks for reporting. We solved some related issues lately, but seems like we forgot this part :/

    @n3gative Will send the fixed version to Bellevue soon, so they can apply it to their theme.

    @dvankooten We already had some mail contact, will send a second fixed version soon.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Uncaught SyntaxError’ is closed to new replies.