Unhandled Rejection TypeError during Upgrade 6.0.7 to 7.1

Upgrading from 6.07 to 7.1 Pro but keep getting the following error


there is a if condition on line no 6354 and the condition looks for this.cache.
So I thought of checking when it changed turns out in v 6.1 the return was was modified and Promise was used and somehow it is not able to access the ‘this’ variable.

For now i commented out if condition as i do not want any modification to the url and the did preliminary testing so everything looks fine.

Wanted to check if there is any other use case of that condition.

Adding to this, the exportToExcel is a bit messed up for me.

  1. Date Formatting: using moment to format data worked with the previous version . using moment(date).format(“YYYY-MM-DD”)

  2. Color: I am using custom colors, so using visual:base-colors, but for some reason it only keeps the color which are visible on the screen and the rest of the colors are reset.

Hello Weerdhawal,

Upgrading from 6.07 to 7.1 Pro but keep getting the following error
image
image.png1520x252 27.5 KB
there is a if condition on line no 6354 and the condition looks for this.cache.
So I thought of checking when it changed turns out in v 6.1 the return was was modified and Promise was used and somehow it is not able to access the ‘this’ variable.
For now i commented out if condition as i do not want any modification to the url and the did preliminary testing so everything looks fine.
Wanted to check if there is any other use case of that condition.

We received your message in the support system. Let’s continue discussing this question there.


Date Formatting: using moment to format data worked with the previous version . using moment(date).format(“YYYY-MM-DD”)

The date format for the Excel files is hardcoded. It is more related to the export module/export service than to Gantt:

Recently, the dev team added a way to specify the date format in the date_format parameter:

  gantt.exportToExcel({
    visual: true,
    date_format: "ddd/m/yy"
  })

You can see how it works in the following snippet:
http://snippet.dhtmlx.com/5/a40094917


Color: I am using custom colors, so using visual:base-colors, but for some reason it only keeps the color which are visible on the screen and the rest of the colors are reset.

Looks like the issue occurs because of the smart rendering. The tasks outside the viewport are not displayed, so Gantt doesn’t save their colors. The dev team will fix it in the future, but I cannot give you any ETA.

As a workaround, you can turn off the gantt.config.smart_rendering property, reinitialize Gantt (or reset the layout), export the data and revert the changes.
Here is an example:
http://snippet.dhtmlx.com/5/75d3ad6e6