codevise / pageflow

Multimedia story telling for the web.
http://pageflow.io
MIT License
688 stars 125 forks source link

Missing Drop Down options creating a new User or adding a membership after migration to new System #2101

Closed rbrenner-snoop closed 3 months ago

rbrenner-snoop commented 3 months ago

Hello,

as described in #2098 i moved an old pageflow installation to a new system. I migrated the database as well as the theme data within the filesystem.

But now i have the problem that i cant add new accounts to a user. Typically this works via the membership view where there is a user select-box at the top but this select box is empty:

pageflow_create_membership

Something similar happens, when creating a new User: The only Account i can select in the dropdown is the default Pageflow Account

pageflow_create_user

Could it be possible that i am missing some migrations? How can i check if there are migrations missing? I tried to look through the pageflow code and im getting the feeling, that it is a database issue in my case. But since i have no Ruby know-how im not sure at all.

Thanks in advance and best regards Ronald

tf commented 3 months ago

Looks like searchable selects are not initializing correctly. Are there JS errors?

Regarding migrations, you need to run bundle exec rake pageflow:install:migrations to copy migrations. But you probably already done that if you have Pageflow Scrolled working...

rbrenner-snoop commented 3 months ago

No, there are no JS errors in my browser console. There are also no errors within my production.log. Since i am the admin user i thought i should be able to give myself or others all memberships.

Is there any configuration i could provide to you for better insights?

tf commented 3 months ago

Let's take a look at your app/assets/javascripts/active_admin.js. The screenshots make it look like the select2/active_admin-searchable_select Javascript is missing.

rbrenner-snoop commented 3 months ago

This is the whole content of that file app/assets/javascripts/active_admin.js:

//= require jquery
//= require active_admin/base
rbrenner-snoop commented 3 months ago

i have added //= require pageflow/admin to that file after comparing it with the one from the old installation and now everything works fine.

Im somewhat confused, that this line was not added by the installation in the first place.

tf commented 3 months ago

Maybe because you installed Active Admin in Webpacker mode?

rbrenner-snoop commented 3 months ago

That could be the source of the problem. I see that i made a lot thinks worse by experimenting. I would like to provide a suggestions for the documentation for others not to make the same mistakes i made which solely were based on assumptions and which we all clarified. What would be the proper workflow for that?

But with that this issue can be closed now. Thanks a lot.... again 😅

tf commented 3 months ago

Happy to accept pull requests with additions to README or troubleshooting files. Alternatively, a well crafted GitHub issue can also go along way to document a known issue.