Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with DHTMLX lib 8.0 - Printing Service #36

Open
jzzh opened this issue Feb 26, 2024 · 3 comments
Open

Issue with DHTMLX lib 8.0 - Printing Service #36

jzzh opened this issue Feb 26, 2024 · 3 comments

Comments

@jzzh
Copy link

jzzh commented Feb 26, 2024

Hi Ottmar

After upgrading to version 8.0.x there were no errors and the Gantt rendering is still working.

There is just the issue with the changes for the printing service.

Printing in 8.0 now works with an extension and the PDF generation is only creating empty files for me.

gantt.plugins({
export_api: true
});
https://docs.dhtmlx.com/gantt/migrating.html

I tried this workaround by hardcoding the setting in the Plugin code, but it did not have an effect.

-- prepare code for extensions 
v_extensions := APEX_UTIL.STRING_TO_TABLE(p_region.attribute_17);
    for i in 1..v_extensions.count loop
        v_extensions_js := v_extensions_js || 'gantt.plugins({ ' || v_extensions(i) || ': true });';
    end loop;
-- Hardcoded Workaround
v_extensions_js := v_extensions_js || 'gantt.plugins({ export_api: true });';

Would you know a workaround until you find the time to upgrade the plugin to 8.0 ?

Thanks,
Jochen

@jzzh
Copy link
Author

jzzh commented Feb 26, 2024

Also relevant for this problem is that Google Chrome will be blocking cross-site cookies as this was used in the API call to DHTMLX before. The call to
https://export.dhtmlx.com/gantt/api.js
will not be working then anymore..

Warning in Chrome console:
Reading cookie in cross-site context will be blocked in future Chrome versions
Cookies with the SameSite=None; Secure and not Partitioned attributes that operate in cross-site contexts are third-party cookies. In future Chrome versions, reading third-party cookies will be blocked. This behavior protects user data from cross-site tracking.
Please refer to the article linked to learn more about preparing your site to avoid potential breakage.
3 cookies
Name Domain & Path
_ym_uid .dhtmlx.com/
_ym_d .dhtmlx.com/
_ym_isad .dhtmlx.com/

https://developers.google.com/privacy-sandbox/3pcd#report-issues

@jzzh
Copy link
Author

jzzh commented Feb 26, 2024

My bad, printing works with 8.0 !

It was not a problem with the new version, but with my custom template scales.
The only thing you have to do is calling:

gantt.plugins({
export_api: true
});

instead of
apex.jQuery.getScript("https://export.dhtmlx.com/gantt/api.js");

in "After Init JS Code" attribute.

@ogobrecht
Copy link
Owner

Hi Jochen,

thanks for all your input and testing. This helps to cut down the needed time for an update.

Best regards
Ottmar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants