Skip to content

Load ZetaJS assets from CDN for document editing#5

Merged
erseco merged 1 commit intomainfrom
feature/configure-zetajs-to-load-via-cdn
Oct 13, 2025
Merged

Load ZetaJS assets from CDN for document editing#5
erseco merged 1 commit intomainfrom
feature/configure-zetajs-to-load-via-cdn

Conversation

@erseco
Copy link
Copy Markdown
Collaborator

@erseco erseco commented Oct 13, 2025

Summary

  • define the default CDN endpoint for ZetaJS assets and surface a reusable browser-mode message
  • update the ZetaJS converter to detect CDN usage, adjust PDF generator handling, and expose config helpers
  • enqueue a module loader on the document editor to preload CDN assets and guide the admin UI when PDF export stays browser-side

Testing

  • php -l resolate.php
  • php -l includes/class-resolate-zetajs.php
  • php -l includes/class-resolate-document-generator.php
  • php -l includes/class-resolate-admin.php

https://chatgpt.com/codex/tasks/task_e_68ecb8a07e8c8322a6bf2659a6177b5f

@erseco erseco merged commit 132b705 into main Oct 13, 2025
3 of 4 checks passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment thread resolate.php
Comment on lines +30 to +32
if ( ! defined( 'RESOLATE_ZETAJS_CDN_BASE' ) ) {
define( 'RESOLATE_ZETAJS_CDN_BASE', 'https://cdn.zetaoffice.net/zetaoffice_latest/' );
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Default CDN constant disables configured ZetaJS CLI PDFs

Defining RESOLATE_ZETAJS_CDN_BASE to a non‑empty URL by default makes Resolate_Zetajs_Converter::is_cdn_mode() return true on every install, so generate_pdf() now always returns the browser‑only error and the PDF button is disabled even when RESOLATE_ZETAJS_BIN was already configured. Existing sites that previously produced PDFs via the local CLI will regress unless administrators manually override this constant to an empty string. Consider leaving the CDN base undefined by default or only setting it when the CDN mode is explicitly enabled so server-side conversions keep working out of the box.

Useful? React with 👍 / 👎.

@erseco erseco deleted the feature/configure-zetajs-to-load-via-cdn branch February 26, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant