-
Notifications
You must be signed in to change notification settings - Fork 126
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
Asset precompilation fails after pageflow-scrolled installation #2098
Comments
Hi, the error says that it cannot find the All the best |
Hi Tim, i have separately added classnames via Besides having the errors, the warnings are interesting as well. Especially the "incorrect peer dependency" of react from pageflow-scrolled. These dependencies should be met by my yarn.lock file. I am suspicious since i would expect suche dependencies to be installed by the modules already installed.
Also i just found out, that the admin interface should probably have a pageflow look and feel to it which it does not have in my installation. So there is something wrong big time 😅 Thanks and best regards |
Hi, this looks like a combination of different issues.
Hope this helps to get you started. Tim |
Hello Tim, thanks for your elaborate response!
Thanks and best regards |
|
i switched the ActiveAdmin configuration back to not using webpacker. This solved the errors that occurred in the ActiveAdmin interface. Additionally i downgraded
i think i misconfigured something here but have no idea where to look. Here is my config/initializers/pageflow.rb: Thanks and best regards |
Could it be, that the pageflow-scrolled install documentation misses the |
Pageflow Scrolled does not load Not clear to me why this should be undefined. Is this really the first error that happens? Could you maybe zip the compiled JS files that are loaded from the |
Hello Tim, here are the loaded javascript files when i open the Editor for the Scrolled Entry: These two errors are the first and only errors that happen. I looked into the production.log where everything is fine. Thanks so far for your excellent help! Best regards |
Thanks. Could you also share your |
of course! There is a console.log in my environment since i had the problems with ActiveAdmin. |
The error means that some code is calling something like: import {editor} from 'pageflow/editor';
editor.widgetTypes.register(...)
// ^ Cannot read properties of undefined (reading 'widgetTypes') Looking at your bundle, I see that # Additional paths webpack should lookup modules
# ['app/assets', 'engine/foo/app/assets']
resolved_paths: ['app/assets', 'app/assets/javascripts', 'app/assets/stylesheets', 'app/javascript/pageflow-scrolled/themes/'] This basically tells Webpack to also look into these paths when resolving modules. Pageflow Scrolled does not require any |
This changed something 😄 Now i get a browser alert saying "Error while starting editor." The production.log shows the following error:
I directly added the themes i had for the regular pageflow entry type to pageflow scrolled as it is described here: Do i have to put these in the resolved paths? |
Let's first see whether you cam get Pageflow Scrolled to work with its default configuration and without extra themes. The mentioned error is caused by a left-over dependency of Pageflow Scrolled themes on some Sprockets assets. This is a know issue that so far was only documented internally. I now created #2099 to track this here as well. |
So how should i handle this now? Remove the themes for pageflow-scrolled and recompile the assets? I am currently trying to create a Page with the default theme so this should not be a problem or is it? |
The editor loads a list of available themes no matter which theme the current entry uses. This is necessary to make the theme selection dialog in the editor work. Since your custom theme runs into #2099, the editor cannot start. Either create the missing Sprockets assets to work around #2099 for your custom theme or comment out the |
We are up to the next error 😅
This seems to be caused by the page types i have already installed for pageflow-paged. Here is how i installed them:
This should is how it is explained within the documentation i think and exactly the way it was on the old system.
? |
Yes. Same for any widgets that are specific to Paged. |
This looks very good already! I am now able to start the editor and add sections and elements. But it seems that i can not interact with the elements like writing text within the "heading" or "textblock" element.
This could also be caused by this label within the elements themselves: And if i start the preview there is a server error. In the production.log i find this:
Furthermore the translations seem to be missing. |
Is the jquery plugin still in your |
Great! Now the editor as well as the Preview seems to work smoothly. Just the translation while image upload are missing, but this is something which is mentioned in the troubleshooting i think. Do i understand it right, that adding new themes does not work properly for Pageflow Next at the moment? I still got another Problem with the new installation regarding the selections within ActiveAdmin but thats another Issue for which i would open another Issue if i dont find the solution myself. Thanks a lot Tim! Great experience every time! Best regards |
Happy to hear it's working! Adding new themes absolutely works. You only need to add the asset pipeline files mentioned in #2099. Ideally those should either also come from Webpacker or not be needed at all. But for now they are required. |
Are these the only missing translations in the editor? |
Ah yes, here Pageflow Scrolled unintentionally relies on translations provided by |
Thanks! The translations do work now after i created the translation files. I'll close the issue then now. I'll have to try to add the other themes but you already hinted me on how. I think my ActiveAdmin Problem is also Pageflow related but i'll open a separate Issue for that. Thanks a lot and best regards |
Hello pageflow team,
i am in the midst of migrating our pageflow application to a new VM with updated Node version to run pageflow-scrolled.
I still run in some issues with active admin but for now my main problem persists with the installation of pageflow-scrolled.
After installing the page type according to https://github.com/codevise/pageflow/tree/master/entry_types/scrolled
i wanted to precompile the assets and the compilation step fails. Since the stack trace is quite long i upload a text file with it:
pageflow_scrolled_asset_precompilation_error.txt
My Setup is:
Rails 5.2.8.1
Ruby 2.5.9
webpacker 4.3.0
i add my Gemfile.lock as well as my package.json as a zip here:
pageflow_gemfile_package.zip
Is there anything i am missing? I would appreciate your help. If any other Information is needed im more than happy to provide it.
Thanks in advance and best regards
The text was updated successfully, but these errors were encountered: