Skip to main content

Search and Top Navigation

#15406 new bug ()

Opened June 25, 2021 02:31PM UTC

Last modified June 26, 2021 08:09AM UTC

Uncaught TypeError: Converting circular structure to JSON

Reported by: kesavanpos Owned by:
Priority: major Milestone: none
Component: ui.sortable Version: 1.12.1
Keywords: Cc: kesavanpos
Blocked by: Blocking:
Description

While consuming jquery 3.6.0 with jquery-ui-1.12.1.

We are using jquery.ui for sortable feature and we have drag drop feature for widgets. After performing drag operation.

In stop event while stringifying current item JSON.stringify($(this).data().uiSortable.currentItem)

Getting below error:

VM400:1 Uncaught TypeError: Converting circular structure to JSON
    --> starting at object with constructor '$.<computed>.<computed>'
    |     property 'element' -> object with constructor 'jQuery.fn.init'
    |     property '0' -> object with constructor 'HTMLUListElement'
    |     property 'jQuery360090081558503569452' -> object with constructor 'Object'
    --- property 'uiSortable' closes the circle
Attachments (0)
Change History (3)

Changed June 25, 2021 04:29PM UTC by kesavanpos comment:1

cc: → kesavanpos
priority: minormajor

Changed June 25, 2021 06:42PM UTC by rjollos comment:2

description: While consuming jquery 3.6.0 with jquery-ui-1.12.1. \ \ We are using jquery.ui for sortable feature and we have drag drop feature for widgets. After performing drag operation. \ \ In stop event while stringifying current item JSON.stringify($(this).data().uiSortable.currentItem) \ \ Getting below error: \ \ VM400:1 Uncaught TypeError: Converting circular structure to JSON \ --> starting at object with constructor '$.<computed>.<computed>' \ | property 'element' -> object with constructor 'jQuery.fn.init' \ | property '0' -> object with constructor 'HTMLUListElement' \ | property 'jQuery360090081558503569452' -> object with constructor 'Object' \ --- property 'uiSortable' closes the circle \ \ \ \ While consuming jquery 3.6.0 with jquery-ui-1.12.1. \ \ We are using jquery.ui for sortable feature and we have drag drop feature for widgets. After performing drag operation. \ \ In stop event while stringifying current item `JSON.stringify($(this).data().uiSortable.currentItem)` \ \ Getting below error: \ \ {{{ \ VM400:1 Uncaught TypeError: Converting circular structure to JSON \ --> starting at object with constructor '$.<computed>.<computed>' \ | property 'element' -> object with constructor 'jQuery.fn.init' \ | property '0' -> object with constructor 'HTMLUListElement' \ | property 'jQuery360090081558503569452' -> object with constructor 'Object' \ --- property 'uiSortable' closes the circle \ }}} \ \ \

Changed June 26, 2021 08:09AM UTC by kesavanpos comment:3

Please find below js fiddle to reproduce above issue

https://jsfiddle.net/34tbq5jL/3/