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

New Volunteer Project fails to render properly after page reload #613

Closed
messica opened this issue Sep 6, 2024 · 6 comments · Fixed by #614
Closed

New Volunteer Project fails to render properly after page reload #613

messica opened this issue Sep 6, 2024 · 6 comments · Fixed by #614

Comments

@messica
Copy link

messica commented Sep 6, 2024

A client has been having an issue where the New Volunteer Project page fails to render properly after the page is reloaded -- it only works once after clearing all caches via cv flush or the System.flush API call, then refreshing the page breaks it again.

Screen Shot 2024-09-06 at 7 26 47 PM

This error shows in the Console:
angular.js:15697 TypeError: Cannot read properties of undefined (reading 'entityTable') at setFormDefaults (angular-modules.fae853a00d962529bcdd5a9f326dfe43.js:2051:47) at new <anonymous> (angular-modules.fae853a00d962529bcdd5a9f326dfe43.js:2063:5) at Object.instantiate (angular.js:5223:14) at angular.js:11829:18 at Object.link (angular-modules.fae853a00d962529bcdd5a9f326dfe43.js:1668:217) at angular.js:1391:15 at Ca (angular.js:11376:9) at p (angular.js:10695:11) at g (angular.js:9942:13) at angular.js:9807:30 '<div ng-view="" class="ng-scope">'

I was able to trace the issue to CiviCRM 5.69.0 with git bisect, so I suspect it has something to do with the changes made to how Angular modules are cached but I didn't spend too much time digging. Also, I have not attempted to recreate this issue on a clean CiviCRM install.

@jmcclelland
Copy link
Contributor

I'm experiencing the same problem and after seeing your post, also think it's the cache. If I run cv flush and reload the page it works. But if I reload it again, it fails. In my console I get:

TypeError: CRM.vars['org.civicrm.volunteer'] is undefined

@jmcclelland
Copy link
Contributor

@colemanw Do you have any thoughts on how to fix what appears to be a afform caching problem with civivolunteer?

colemanw added a commit to colemanw/org.civicrm.volunteer that referenced this issue Sep 16, 2024
@colemanw
Copy link
Member

@jmcclelland sure ^

@jmcclelland
Copy link
Contributor

@colemanw Thank you!!

@colemanw
Copy link
Member

@jmcclelland when you get a chance to test & verify it works pls leave a review comment on the PR.

jmcclelland pushed a commit to progressivetech/org.civicrm.volunteer that referenced this issue Sep 17, 2024
jmcclelland pushed a commit to progressivetech/org.civicrm.volunteer that referenced this issue Sep 17, 2024
@jmcclelland
Copy link
Contributor

@colemanw Tested and it works. Thanks again!

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 a pull request may close this issue.

3 participants