Project

General

Profile

Actions

Bug #15321

closed

Cannot save smart parameter bookmarks

Added by Brad Buckingham almost 8 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Web Interface
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1334514
Description of problem:
When I try to save a bookmark for smart parameters, I get redirected back to the New Bookmark page after pressing Submit. Subsequent attempts to save the bookmark give the same result

Version-Release number of selected component (if applicable):
6.2.0 beta SNAP 10

How reproducible:

Steps to Reproduce:
1. Search for smart class parameter with e.g. puppetclass_name = ntp
2. On results page, click 'Bookmark this search'
3. Fill in the form, click 'submit'

Actual results:
New Bookmark page loads, clicking submit only reloads this page.

Expected results:
Bookmark is saved and available from drop down on search field

Additional info:


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #14535: /api/smart_class_parameters needs administrator permissionsClosedOri Rabin04/07/2016Actions
Actions #1

Updated by Dominic Cleal almost 8 years ago

  • Status changed from New to Need more information

I can't reproduce this on Foreman's develop, but presumably you have? Could you please provide debug logs?

2016-06-07T10:56:43 [app] [I] Started GET "/bookmarks/new?kontroller=puppetclass_lookup_keys&query=%20key%20=%20agent_template" for 127.0.0.1 at 2016-06-07 10:56:43 +0100
2016-06-07T10:56:43 [app] [I] Processing by BookmarksController#new as HTML
2016-06-07T10:56:43 [app] [I]   Parameters: {"kontroller"=>"puppetclass_lookup_keys", "query"=>" key = agent_template"}
2016-06-07T10:56:43 [sql] [D]   ActiveRecord::SessionStore::Session Load (0.1ms)  SELECT  "sessions".* FROM "sessions" WHERE "sessions"."session_id" = ?  ORDER BY "sessions"."id" ASC LIMIT 1  [["session_id", "a82b5d0bea1228b28b5a38ea0be34ed5"]]
2016-06-07T10:56:43 [sql] [D]   User Load (0.1ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1  [["id", 24]]
2016-06-07T10:56:43 [app] [D] Setting current user thread-local variable to admin
2016-06-07T10:56:43 [sql] [D]   AuthSource Load (0.2ms)  SELECT  "auth_sources".* FROM "auth_sources" WHERE "auth_sources"."id" = ? LIMIT 1  [["id", 1]]
2016-06-07T10:56:43 [app] [I]   Rendered bookmarks/_form.html.erb (7.8ms)
2016-06-07T10:56:43 [app] [I]   Rendered bookmarks/new.html.erb within layouts/application (11.1ms)
2016-06-07T10:56:43 [app] [I]   Rendered layouts/_application_content.html.erb (0.8ms)
2016-06-07T10:56:43 [app] [I]   Rendered home/_user_dropdown.html.erb (3.5ms)
2016-06-07T10:56:43 [app] [I]   Rendered home/_org_switcher.html.erb (0.4ms)
2016-06-07T10:56:43 [app] [I]   Rendered home/_submenu.html.erb (1.8ms)
2016-06-07T10:56:43 [app] [I]   Rendered home/_submenu.html.erb (1.4ms)
2016-06-07T10:56:43 [app] [I]   Rendered home/_submenu.html.erb (1.2ms)
2016-06-07T10:56:43 [app] [I]   Rendered home/_submenu.html.erb (1.0ms)
2016-06-07T10:56:43 [app] [I]   Rendered home/_submenu.html.erb (1.2ms)
2016-06-07T10:56:43 [app] [I]   Rendered home/_topbar.html.erb (31.8ms)
2016-06-07T10:56:43 [app] [I]   Rendered layouts/base.html.erb (840.3ms)
2016-06-07T10:56:43 [app] [I] Completed 200 OK in 872ms (Views: 865.6ms | ActiveRecord: 0.4ms)
2016-06-07T10:56:43 [sql] [D]    (0.1ms)  begin transaction
2016-06-07T10:56:43 [sql] [D]   SQL (0.2ms)  UPDATE "sessions" SET [..]
2016-06-07T10:56:44 [sql] [D]    (21.7ms)  commit transaction
2016-06-07T10:56:46 [app] [D] 
2016-06-07T10:56:46 [app] [D] 
2016-06-07T10:56:46 [app] [I] Started POST "/bookmarks" for 127.0.0.1 at 2016-06-07 10:56:46 +0100
2016-06-07T10:56:46 [app] [I] Processing by BookmarksController#create as HTML
2016-06-07T10:56:46 [app] [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"7CcMuwaOIyZ+jAdNZ8+AwuWGz0CuQz9IMxB9or24ZsakUVNicYtvaYBHf54d5luaIQowOKMTI3WrLDCOFkO9WQ==", "bookmark"=>{"name"=>"key", "query"=>"key = agent_template", "public"=>"1", "controller"=>"puppetcl
ass_lookup_keys"}, "commit"=>"»Submit«"}
2016-06-07T10:56:46 [sql] [D]   ActiveRecord::SessionStore::Session Load (0.1ms)  SELECT  "sessions".* FROM "sessions" WHERE "sessions"."session_id" = ?  ORDER BY "sessions"."id" ASC LIMIT 1  [["session_id", "a82b5d0bea1228b28b5a38ea0be34ed5"]]
2016-06-07T10:56:46 [sql] [D]   User Load (0.1ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1  [["id", 24]]
2016-06-07T10:56:46 [app] [D] Setting current user thread-local variable to admin
2016-06-07T10:56:46 [sql] [D]   AuthSource Load (0.1ms)  SELECT  "auth_sources".* FROM "auth_sources" WHERE "auth_sources"."id" = ? LIMIT 1  [["id", 1]]
2016-06-07T10:56:46 [sql] [D]    (0.1ms)  begin transaction
2016-06-07T10:56:46 [sql] [D]    (0.2ms)  SELECT COUNT(*) FROM "bookmarks" WHERE (((bookmarks.public = 't') OR (bookmarks.owner_id = 24 AND bookmarks.owner_type = 'User'))) AND "bookmarks"."name" = ?  [["name", "key"]]
2016-06-07T10:56:46 [sql] [D]    (0.7ms)  SELECT DISTINCT "permissions"."resource_type" FROM "permissions"  ORDER BY "permissions"."resource_type" ASC
2016-06-07T10:56:46 [sql] [D]   SQL (0.3ms)  INSERT INTO "bookmarks" ("name", "query", "public", "controller", "owner_id", "owner_type") VALUES (?, ?, ?, ?, ?, ?)  [["name", "key"], ["query", "key = agent_template"], ["public", "t"], ["controller", "puppetclass_lookup_ke
ys"], ["owner_id", 24], ["owner_type", "User"]]
2016-06-07T10:56:46 [sql] [D]   Bookmark Load (0.2ms)  SELECT  "bookmarks".* FROM "bookmarks" WHERE "bookmarks"."id" = ?  ORDER BY "bookmarks"."name" ASC LIMIT 1  [["id", 15]]
2016-06-07T10:56:46 [sql] [D]    (0.4ms)  SELECT MAX("audits"."version") FROM "audits" WHERE "audits"."auditable_id" = ? AND "audits"."auditable_type" = ?  [["auditable_id", 15], ["auditable_type", "Bookmark"]]
2016-06-07T10:56:46 [sql] [D]   SQL (1.5ms)  INSERT INTO "audits" ("action", "audited_changes", "auditable_id", "auditable_type", "user_id", "username", "auditable_name", "created_at", "version", "request_uuid", "remote_address") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) 
 [["action", "create"], ["audited_changes", "---\nname: key\nquery: key = agent_template\ncontroller: puppetclass_lookup_keys\npublic: true\nowner_id: 24\nowner_type: User\n"], ["auditable_id", 15], ["auditable_type", "Bookmark"], ["user_id", 24], ["username", " User"], 
["auditable_name", "key"], ["created_at", "2016-06-07 09:56:46.313940"], ["version", 1], ["request_uuid", "867e7368-c9ef-4ebe-b48e-9f6660783641"], ["remote_address", "127.0.0.1"]]
2016-06-07T10:56:46 [sql] [D]    (31.0ms)  commit transaction
2016-06-07T10:56:46 [app] [I] Redirected to http://0.0.0.0:3000/puppetclass_lookup_keys
2016-06-07T10:56:46 [app] [I] Completed 302 Found in 74ms (ActiveRecord: 34.8ms)
2016-06-07T10:56:46 [sql] [D]    (0.1ms)  begin transaction
2016-06-07T10:56:46 [sql] [D]   SQL (0.2ms)  UPDATE "sessions" SET [..]
2016-06-07T10:56:46 [sql] [D]    (29.7ms)  commit transaction
Actions #2

Updated by Tomer Brisker over 7 years ago

This has been resolved by the fix for http://projects.theforeman.org/issues/14535

Actions #3

Updated by Tomer Brisker over 7 years ago

  • Related to Bug #14535: /api/smart_class_parameters needs administrator permissions added
Actions #4

Updated by Tomer Brisker over 7 years ago

  • Status changed from Need more information to Resolved
Actions

Also available in: Atom PDF