а

Weird bug with Gantt 6.1.3/4


#1

Hi,

I have a issue with 6.1.3 and 6.1.4. I try my best to describe it, and I currently have no way to extract and produce a working snippet to re-produce the issue yet. The project is written in React.

So the current UI has two screen, Add
This first screen is the place/component where the chart is rendered (init)
The current screen is showing only the grid as I have kept theshow_chart to hidden.

and Back.

When the Add button is clicked, a Form component will appear (I have blanked it out).
From the Form, there’s Back button to go back to the previous component (which is the Add page)

Now, using v6.1.3 and 6.1.4, whenever I click Add and then Back it will throw me this exception. You can find it in the attachment, do scroll down to view the error. Note that, sometimes I get the exception only after I have click Add and Back twice and onwards. Sometimes the first time I click on Back, it will hit the exception.

gantt_exception_1.html (341.2 KB)
gantt_exception_2.html (350.9 KB)

I tested with v6.1.2, I am able to click Add and Back (multiple times) without hitting the exception.
I am also not trying to re-init the Chart multiple times. There is only one gantt.init() and it’s only on mount.

The component setup is similar to my Github Demo except that my Github one does not have the Add and Back button at the moment. However, the way I arrange my component and init the gantt is almost the same as the actual project.

Let me know if this is sufficient to track down the issue. If not, I need to think of some way to re-produce it. Or let me know if there’s any logs generated by gantt so I can attach it here.

Thanks!


Quick Info / Tooltip Extension
#2

Hi,
thank you, @Joseph, I’ve reproduced the error.
Looks like the exception is fired each when you destroy or re-initialize gantt with gantt.config.show_chart = false config.
E.g. http://snippet.dhtmlx.com/832d4dcad

I’ll submit it to our tracker, likely we’ll be able to do a quick fix. It might take a couple of days before we publish a bugfix update, though.
Please PM me if you need a fixed build sooner


Quick Info / Tooltip Extension
#3

HI @Aliaksandr,

Thanks for the quick fix. I shall keep you updated of my testing with the pre release build.


#4

Hi,

The issue seem to be fixed with some basic test.

Shall wait for your next release to test more.

Thank you.

Anyway, I wasn’t able to install and run using npm i <path-to-prerelease-dir>. After I install, the package.json in my project is pointing to the directory. When I start my app, it complain cannot find body-parser package, so I went into the prerelease-dir and perform a npm i, and try to start my app again, there another error which I can’t recall.

So in the end, what I did was to install 6.1.4 by npm i dhtmlx-gantt which by default pull the latest version. Then I copy the files in the root, and codebase directory of prerelease into my project/node_modules and overwrite it. I assume that would then run using the prerelease source code. Which I tested it to be working fine.


#5

Hello Joseph,

Anyway, I wasn’t able to install and run using npm i <path-to-prerelease-dir> . After I install, the package.json in my project is pointing to the directory. When I start my app, it complain cannot find body-parser package, so I went into the prerelease-dir and perform a npm i , and try to start my app again, there another error which I can’t recall.

So in the end, what I did was to install 6.1.4 by npm i dhtmlx-gantt which by default pull the latest version. Then I copy the files in the root, and codebase directory of prerelease into my project/node_modules and overwrite it. I assume that would then run using the prerelease source code. Which I tested it to be working fine.

That bug was fixed in the 6.1.7 version:
https://docs.dhtmlx.com/gantt/whatsnew.html#617
Now, Gantt should be correctly installed when you use the npm install "path to the folder with the package.json file" command to install the pro version.