Skip to content

fix(FOUR-33644): initialize screen cache config in Vite preview loader - #9088

Open
gproly wants to merge 2 commits into
developfrom
bugfix/FOUR-33688
Open

gproly wants to merge 2 commits into
developfrom
bugfix/FOUR-33688

Conversation

@gproly

@gproly gproly commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Screen preview was migrated to Vite via loaderScreenPreview.js, which calls setupMain() but did not initialize ProcessMaker.screen or initializeScreenCache(). DataProvider.getDataSource() reads ProcessMaker.screen.cacheEnabled/cacheTimeout and threw when screen was undefined. The error was swallowed in FormSelectList, so Data Connector Select Lists showed "No Data Available" even when the connector endpoint returned HTTP 200 (FOUR-33688, FOUR-33644).

Initialize screen cache settings from meta tags and call initializeScreenCache() after setupMain(), matching bootstrap.js and screenBuilder.js behavior.

Also remove accidental debug text from previewscreennextvite.blade.php.

https://processmaker.atlassian.net/browse/FOUR-33688
https://processmaker.atlassian.net/browse/FOUR-33644

Screen preview was migrated to Vite via loaderScreenPreview.js, which
calls setupMain() but did not initialize ProcessMaker.screen or
initializeScreenCache(). DataProvider.getDataSource() reads
ProcessMaker.screen.cacheEnabled/cacheTimeout and threw when screen was
undefined. The error was swallowed in FormSelectList, so Data Connector
Select Lists showed "No Data Available" even when the connector endpoint
returned HTTP 200 (FOUR-33688, FOUR-33644).

Initialize screen cache settings from meta tags and call
initializeScreenCache() after setupMain(), matching bootstrap.js and
screenBuilder.js behavior.

Also remove accidental debug text from previewscreennextvite.blade.php.

https://processmaker.atlassian.net/browse/FOUR-33688
https://processmaker.atlassian.net/browse/FOUR-33644
@pmPaulis pmPaulis changed the title fix(FOUR-33644): initialize screen cache config in Vite preview loader fix(FOUR-33644): initialize screen cache config in Vite preview loader Oct 5, 2026
Extract initializeScreenCacheFromMeta to read screen cache settings from
meta tags, set ProcessMaker.screen, and call initializeScreenCache().

Use the helper in Vite entry points that call Vue.use(ScreenBuilder) or
mount forms before screenBuilder async init runs, where bootstrap.js is
not loaded. This fixes Data Connector Select Lists showing "No Data
Available" when ProcessMaker.screen was undefined (FOUR-33688, FOUR-33644).

- Add resources/js/next/initializeScreenCacheFromMeta.js (idempotent)
- Refactor resources/js/next/screenBuilder.js to use the helper
- Update loaderScreenPreview, loaderScreen, loaderRequestsShow,
  loaderRequestsPreview, loaderTasks, and vite/tasks/loaderTasks

https://processmaker.atlassian.net/browse/FOUR-33688
https://processmaker.atlassian.net/browse/FOUR-33644
@cursor

cursor Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Frontend bootstrap-only change with idempotent init; fixes missing config on preview loaders without altering server auth or data handling.

Overview
Introduces initializeScreenCacheFromMeta, which reads screen cache settings from page meta tags, sets ProcessMaker.screen, and calls initializeScreenCache once (guarded so repeat calls are safe).

Screen-builder entry points that only ran setupMain() now call this helper after setupMain()—including the Vite screen preview loader—so data connector select lists no longer fail when ProcessMaker.screen was undefined.

screenBuilder.js drops inline meta parsing and uses the shared helper instead. previewscreennextvite.blade.php removes stray debug text (PORE).

Reviewed by Cursor Bugbot for commit a697f22. Bugbot is set up for automated code reviews on this repo. Configure here.

@decisions-sonarqube

Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

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

Successfully merging this pull request may close these issues.

2 participants