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

Missing templates for admin forms #2975

Closed
1 of 4 tasks
AndrewKvalheim opened this issue Mar 21, 2022 · 12 comments · May be fixed by #3073
Closed
1 of 4 tasks

Missing templates for admin forms #2975

AndrewKvalheim opened this issue Mar 21, 2022 · 12 comments · May be fixed by #3073
Labels
bug 🐛 Something is wrong and needs to be fixed good first issue For RoR beginners or people unfamiliar with the application

Comments

@AndrewKvalheim
Copy link
Member

I'm submitting a ..

  • Bug Report
  • Feature Request

Current behavior:

Some pages in the admin interface are broken with ActionController::MissingExactTemplate:

  • Administration → Users → Edit (Admin::UsersController#edit)
  • Manage conference → Events → Add Event (Admin::EventsController#new)

Expected correct behavior:

Show the appropriate form.

Steps to reproduce:

In a new instance, create a conference and navigate as above.

Other information:

Completing #2921 should help with this.

@hennevogel
Copy link
Member

It's probably fallout of removing the general new/edit/form templates from app/views/layouts

@hennevogel
Copy link
Member

hennevogel commented Mar 29, 2022

Also point to some missing specs for this functionality

@hennevogel hennevogel added good first issue For RoR beginners or people unfamiliar with the application bug 🐛 Something is wrong and needs to be fixed labels Mar 29, 2022
@ghost
Copy link

ghost commented Apr 16, 2022

@hennevogel I'd love to work on this ^^ Seems like a good first issue to get started 😉

@hennevogel
Copy link
Member

@Liberatys knock yourself out 😃

@YTeyddie22
Copy link

Is this issue still open?

@hennevogel
Copy link
Member

@YTeyddie22 sure is

@mkiroshdz
Copy link
Contributor

@hennevogel I'm working on putting the views back but I'm not sure what fields the user form needs to have. Can you please provide me those?. Thanks

@hennevogel
Copy link
Member

@mkiroshdz sorry for the late answer, this one slipped through the cracks 😞

I would say:

  • name
  • email_public
  • biography
  • nickname
  • affiliation
  • avatar
  • languages
  • is_admin
  • is_disabled

AndrewKvalheim added a commit to AndrewKvalheim/osem that referenced this issue Sep 12, 2022
Fails with:

    1) User admin behaves like admin ability edits a user
       Failure/Error: raise ActionController::MissingExactTemplate, message

       ActionController::MissingExactTemplate:
         Admin::UsersController#edit is missing a template for request formats: text/html

re openSUSE#2975
AndrewKvalheim added a commit to AndrewKvalheim/osem that referenced this issue Sep 12, 2022
Fails with:

    1) Event as an conference organizer create a proposal
       Failure/Error: raise ActionController::MissingExactTemplate, message

       ActionController::MissingExactTemplate:
         Admin::EventsController#new is missing a template for request formats: text/html

re openSUSE#2975
@AndrewKvalheim
Copy link
Member Author

AndrewKvalheim commented Sep 12, 2022

For reference here’s the former template resolution:

Started GET "/admin/users/1/edit"
Processing by Admin::UsersController#edit as HTML
  Rendering layouts/application.html.haml
  Rendering application/edit.html.haml within layouts/application
  Rendered admin/users/_form.html.haml
Started GET "/admin/conferences/example/program/events/new"  
Processing by Admin::EventsController#new as HTML  
  Rendering layouts/application.html.haml
  Rendering application/new.html.haml within layouts/application
  Rendered proposals/_proposal_form.html.haml
  Rendered admin/events/_form.html.haml

AndrewKvalheim added a commit to SeaGL/osem that referenced this issue Sep 14, 2022
#!/usr/bin/env bash
set -Eeuxo pipefail

function merge() { id="$1"; title="$2"
  git pull --no-ff --no-commit --strategy-option 'theirs' 'openSUSE' "pull/$id/head"
  git commit --message "Merge #​$id \"$title\""

  items+=( "- [ ] $title [#$id](https://github.com/openSUSE/osem/pull/$id)" )
}

function pick() { hash="$1"; title="$2"
  git cherry-pick "$hash"
  rebased="$(git rev-parse HEAD)"

  items+=( "- [ ] $title [\`${rebased:0:7}\`]($rebased)" )
}

function revert() { hash="$1"; title="$2"; note="$3"
  git revert --no-edit "$hash"

  items+=( "- [ ] Revert “$title” [\`${hash:0:7}\`](openSUSE@$hash) ($note)" )
}

items=()

git fetch --all --prune
git checkout 'main'
git reset --hard 'openSUSE/master'

merge '2654' 'Fix access to the version history of organization-level roles'
pick '5997a3194383e63088a400896dcb7c78f5b562c7' 'Restore now-passing tests'
merge '3058' 'Add surveys during CFP response'
merge '3059' 'Add setting to disable email notifications of comments'
pick '3b4da2f6930bcd09a5cdecd5b0efc57ed80b6c87' 'Configure for deployment to Dokku'
pick '7afa84bb1e4d34e5d0eda2176f1519fff1588307' 'Restore lost admin forms [openSUSE#2975](openSUSE#2975)'

IFS=$'\n'
cat << MARKDOWN > 'README.md'
# About this branch

Our goal is to run [upstream] OSEM without modifications to its codebase. We currently still make a few modifications in this transitional branch:

${items[*]}

These divergences from upstream should be seen as a to-do list, where completing an item means either solving its need in a general way upstream, or adjusting our procedures to accommodate upstream’s existing capabilities or limitations.

## Guidelines

Don’t develop on this branch. It follows upstream by regularly **rebasing** the above modifications. When a modification is no longer necessary, it will be dropped during the rebase. When there are no remaining modifications, this branch will be deleted.

[upstream]: https://github.com/openSUSE/osem
MARKDOWN
git add 'README.md'
git commit --message "Document branch

$(cat "${BASH_SOURCE[0]}")"

git --no-pager log --color --oneline 'openSUSE/master'..'main'
@Amjt11
Copy link

Amjt11 commented Oct 8, 2022

Lol

@ams0
Copy link

ams0 commented Feb 17, 2023

I'd love to use this for Kubernetes Community Days Amsterdam 2023 but currently hitting this bug too, I cannot add events to manually create the conference schedule. I deployed it on a VM using docker compose instructions.

If you know of any workaround, I'm all ears!

@AndrewKvalheim
Copy link
Member Author

AndrewKvalheim commented Feb 17, 2023

While they’re not yet reviewed there are a few attempted solutions you could pull from in a pinch:

AndrewKvalheim added a commit to AndrewKvalheim/osem that referenced this issue Feb 28, 2023
Fails with:

    1) User admin behaves like admin ability edits a user
       Failure/Error: raise ActionController::MissingExactTemplate, message

       ActionController::MissingExactTemplate:
         Admin::UsersController#edit is missing a template for request formats: text/html

re openSUSE#2975
AndrewKvalheim added a commit to AndrewKvalheim/osem that referenced this issue Feb 28, 2023
Fails with:

    1) Event as an conference organizer create a proposal
       Failure/Error: raise ActionController::MissingExactTemplate, message

       ActionController::MissingExactTemplate:
         Admin::EventsController#new is missing a template for request formats: text/html

re openSUSE#2975
AndrewKvalheim added a commit to AndrewKvalheim/osem that referenced this issue Mar 1, 2023
In openSUSE#2987 the detailed view of the event form was inadvertently lost,
presumably due to openSUSE#2975 masking the problem.
AndrewKvalheim added a commit to AndrewKvalheim/osem that referenced this issue Mar 1, 2023
Fails with:

    1) User admin behaves like admin ability edits a user
       Failure/Error: raise ActionController::MissingExactTemplate, message

       ActionController::MissingExactTemplate:
         Admin::UsersController#edit is missing a template for request formats: text/html

re openSUSE#2975
AndrewKvalheim added a commit to AndrewKvalheim/osem that referenced this issue Mar 1, 2023
Fails with:

    1) Event as an conference organizer create a proposal
       Failure/Error: raise ActionController::MissingExactTemplate, message

       ActionController::MissingExactTemplate:
         Admin::EventsController#new is missing a template for request formats: text/html

re openSUSE#2975
AndrewKvalheim added a commit to AndrewKvalheim/osem that referenced this issue Mar 1, 2023
…ler#edit

 1. Restore views lost during 81853d1:

        git restore --source 4a16836 \
          app/views/admin/users/_form.html.haml \
          app/views/application/edit.html.haml \
          app/views/application/new.html.haml
        mv app/views/application/edit.html.haml app/views/admin/users/
        mv app/views/application/new.html.haml app/views/admin/events/

 2. Convert from Formtastic:

      - app/views/admin/users/_form.html.haml

 3. Add headers as in 81853d1:

      - app/views/admin/events/new.html.haml
      - app/views/admin/users/edit.html.haml

 4. Substitute partial unified in 88b5596:

      - app/views/admin/events/new.html.haml

resolves openSUSE#2975
AndrewKvalheim added a commit to AndrewKvalheim/osem that referenced this issue Mar 1, 2023
…ler#edit

 1. Restore views lost during 81853d1:

        git restore --source 4a16836 \
          app/views/admin/users/_form.html.haml \
          app/views/application/edit.html.haml \
          app/views/application/new.html.haml
        mv app/views/application/edit.html.haml app/views/admin/users/
        mv app/views/application/new.html.haml app/views/admin/events/

 2. Convert from Formtastic:

      - app/views/admin/users/_form.html.haml

 3. Add headers as in 81853d1:

      - app/views/admin/events/new.html.haml
      - app/views/admin/users/edit.html.haml

 4. Substitute partial unified in 88b5596:

      - app/views/admin/events/new.html.haml

resolves openSUSE#2975
AndrewKvalheim added a commit to AndrewKvalheim/osem that referenced this issue Mar 1, 2023
In openSUSE#2987 the detailed view of the event form was inadvertently lost,
presumably due to openSUSE#2975 masking the problem.
AndrewKvalheim added a commit to AndrewKvalheim/osem that referenced this issue Mar 1, 2023
Fails with:

    1) User admin behaves like admin ability edits a user
       Failure/Error: raise ActionController::MissingExactTemplate, message

       ActionController::MissingExactTemplate:
         Admin::UsersController#edit is missing a template for request formats: text/html

re openSUSE#2975
AndrewKvalheim added a commit to AndrewKvalheim/osem that referenced this issue Mar 1, 2023
Fails with:

    1) Event as an conference organizer create a proposal
       Failure/Error: raise ActionController::MissingExactTemplate, message

       ActionController::MissingExactTemplate:
         Admin::EventsController#new is missing a template for request formats: text/html

re openSUSE#2975
AndrewKvalheim added a commit to AndrewKvalheim/osem that referenced this issue Mar 1, 2023
…ler#edit

 1. Restore views lost during 81853d1:

        git restore --source 4a16836 \
          app/views/admin/users/_form.html.haml \
          app/views/application/edit.html.haml \
          app/views/application/new.html.haml
        mv app/views/application/edit.html.haml app/views/admin/users/
        mv app/views/application/new.html.haml app/views/admin/events/

 2. Convert from Formtastic:

      - app/views/admin/users/_form.html.haml

 3. Add headers as in 81853d1:

      - app/views/admin/events/new.html.haml
      - app/views/admin/users/edit.html.haml

 4. Substitute partial unified in 88b5596:

      - app/views/admin/events/new.html.haml

resolves openSUSE#2975
AndrewKvalheim added a commit to AndrewKvalheim/osem that referenced this issue Mar 1, 2023
…ler#edit

 1. Restore views lost during 81853d1:

        git restore --source 4a16836 \
          app/views/admin/users/_form.html.haml \
          app/views/application/edit.html.haml \
          app/views/application/new.html.haml
        mv app/views/application/edit.html.haml app/views/admin/users/
        mv app/views/application/new.html.haml app/views/admin/events/

 2. Convert from Formtastic:

      - app/views/admin/users/_form.html.haml

 3. Add header as in 81853d1:

      - app/views/admin/events/new.html.haml

 4. Substitute partial unified in 88b5596:

      - app/views/admin/events/new.html.haml

resolves openSUSE#2975
AndrewKvalheim added a commit to AndrewKvalheim/osem that referenced this issue May 2, 2023
In openSUSE#2987 the detailed view of the event form was inadvertently lost,
presumably due to openSUSE#2975 masking the problem.
AndrewKvalheim added a commit to AndrewKvalheim/osem that referenced this issue May 2, 2023
Fails with:

    1) User admin behaves like admin ability edits a user
       Failure/Error: raise ActionController::MissingExactTemplate, message

       ActionController::MissingExactTemplate:
         Admin::UsersController#edit is missing a template for request formats: text/html

re openSUSE#2975
AndrewKvalheim added a commit to AndrewKvalheim/osem that referenced this issue May 2, 2023
Fails with:

    1) Event as an conference organizer create a proposal
       Failure/Error: raise ActionController::MissingExactTemplate, message

       ActionController::MissingExactTemplate:
         Admin::EventsController#new is missing a template for request formats: text/html

re openSUSE#2975
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something is wrong and needs to be fixed good first issue For RoR beginners or people unfamiliar with the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants