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

Error in Pageflow Scrolled after Update to 16.1 #2190

Closed
rbrenner-snoop opened this issue Jan 15, 2025 · 7 comments
Closed

Error in Pageflow Scrolled after Update to 16.1 #2190

rbrenner-snoop opened this issue Jan 15, 2025 · 7 comments

Comments

@rbrenner-snoop
Copy link

Hello Pageflow Team,

after i updated my pageflow gem to the version 16.1 according to the update guidelines, i get an error when trying to open the editor or the frontend page of a Pageflow Scrolled page.

The error says the following:

ActionView::Template::Error (Webpacker can't find pageflow-scrolled/widgets/consentBar in /home/pageflow/pageflow_daad/public/packs/manifest.json. Possible causes:
1. You want to set webpacker.yml value of compile to true for your environment
   unless you are using the `webpack -w` or the webpack-dev-server.
2. webpack has not yet re-run to reflect updates.
3. You have misconfigured Webpacker's config/webpacker.yml file.
4. Your webpack configuration is not creating a manifest.
Your manifest contains:
[...]

Since this is in a production environment i would not set the compile value of the webpacker.yml to true. There it is documented to run precompilation separately.

The precompilation creates no errors and runs smoothly. I already deleted the cached files and repeated precompilation.

Is there something i am missing?

Thanks an best regards
Ronald

@rbrenner-snoop
Copy link
Author

i guess this PR has something to do with this situation?
#1976

Is there a manual step vor the update that i have missed?

@rbrenner-snoop
Copy link
Author

Here is my Gemfile, webpacker.yml and (even though i dont think that its relevant) my package.json:

gemfile_packagejson_webpacker_config.zip

i hope you can help.

@rbrenner-snoop
Copy link
Author

After further debugging i think that the following is the problem:
There should be a consentBar.js in the directory app/javascript/packs/pageflow-scrolled/widgets/ but there is only the defaultNavigation.js and the consentBar.js is also not imported in app/javascript/packs/pageflow-scrolled-server.js

@tf
Copy link
Member

tf commented Jan 16, 2025

Yes, you are right. We forgot to mention the manual update step in the changelog. It was made obsolete, though, by #2035 in version 16.2 (see changelog).

Does everything work now as expected?

@rbrenner-snoop
Copy link
Author

That means i directly need to update to 16.2? Or do i just have to make the same manual update step that is documented in the 16.2 changelog? i think the first one since the application is looking for the File which does not exist but gets obsolete in 16.2 right?

@tf
Copy link
Member

tf commented Jan 16, 2025

Yes, you either have to add the file you mentioned above

// app/javascript/packs/pageflow-scrolled/widgets/consentBar.js
import 'pageflow-scrolled/widgets/consentBar';
import 'pageflow-scrolled/widgets/consentBar.css';

and add import 'pageflow-scrolled/widgets/consentBar'; to app/javascript/packs/pageflow-scrolled-server.js. Or you upgrade to 16.2 directly and perform the manual update step for 16.2 from the changelog instead.

@rbrenner-snoop
Copy link
Author

Thank you. Now everything works as expected.

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