question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

404 for actions returned by get_object_actions() but not in objectactions

See original GitHub issue

Currently if an admin view overrides get_object_actions() and returns an action not contained in the objectactions view’s attr, then invoking the action from the admin interface results in a 404.

This occurs because BaseDjangoObjectActions. get_tool_urls uses self. objectactions, not self.get_object_actions().

It seems this might be unavoidable, but is unexpected since it’s not documented, and annoying if you’re trying to create a base/mixin admin view class that use get_object_actions() to provide actions in addition to subclasses that provide their own.

Issue Analytics

  • State:open
  • Created 9 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
archituxcommented, Apr 10, 2018

I’ve faced the same issue just now.

get_object_actions() method works if every action that it would conditionally enable or disable is listed above in change_actions or changelist_actions attribute. You should pass there everything that you may or may not use later.

I don’t know whether it should be fixed or not, but such a behavior should be mentioned in documentation to avoid same questions in the future.

0reactions
psalonencommented, Feb 6, 2015

Are there any fixes available for this issue? I want to use these actions but i need the runtime customization of available actions per object.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Web API 2: OData 4: Actions returning 404 - Stack Overflow
I found that the handler for ExtensionlessHandler-Integrated-4.0 already existed in the web.config, but it's original path=".", was not working.
Read more >
IT17172: "404 NOT FOUND" RETURNED WHEN EXECUTING ...
When performing an RMI (Rest Management Interface) GET request for class metadata for an action class (operation), the appliance returns 404 Not Found....
Read more >
404. That's an error. The requested URL was not found on this ...
The error message is coming form the ourhillcountryretreat server. The file being requested does not exist. It has nothing to do with Google...
Read more >
DNN 404 Handling
Any URL that is requested for a site and which does not match any URL that … ... Because the 404 Error Page...
Read more >
Plugin's action URL not working and showing 404 error
There's a 99% chance you're running into a case-sensitivity issue on your file system. Check your plugin's name, the handle and the action ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found