Ticket #9644 (closed defect (bug): fixed)
(bug) get_categories
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | high | Milestone: | 2.8.1 |
| Component: | Taxonomy | Version: | 2.8 |
| Severity: | critical | Keywords: | has-patch |
| Cc: |
Description
$args = array('hierarchical' => false,'depth'=>false,'echo'=>false,'get'=>'all');
$categories = get_categories($args);
returns
Array ( [errors] => Array ( [invalid_taxonomy] => Array ( [0] => Invalid Taxonomy ) ) [error_data] => Array ( ) )
Attachments
Change History
- Status changed from new to closed
- Resolution set to worksforme
- Severity changed from critical to major
- Status changed from closed to reopened
- Resolution worksforme deleted
ryan
i do not see why this bug is related to "Check if not exists and not is_dir before bailing. Props st3ff3n."
- Status changed from reopened to closed
- Resolution set to worksforme
I believe mtekk's post was that as of revision 11082, Its working as expected under trunk.
It works for me under current trunk.
Given the error message, I'd assume theres a plugin conflict; Or theres a corrupt file.
Trac is not for diagnosing individual problems, You're better off on the support forums, and re-opening this if you find any info which suggests it IS a bug in WP(Such as also occuring on a fresh WP Install without any modifications)
- Status changed from closed to reopened
- Resolution worksforme deleted
Reopening this based on forum reports: http://wordpress.org/support/topic/280256
- Milestone set to 2.8.1
Same issue as #10160??
Seems a number of themes with a theme options page that uses get_categories fail
Technically, these themes are broken in 2.7.1 as well, but the problem won't be evident unless you're using a custom taxonomies plugin. Maybe we can init the default taxonomies right before loading the theme's functions.php to paper over the issue.
but in this case we'd lose the localization of the taxonomies. uploading a potential fix in a few minutes.
I added it after locale is setup. I think that will preserve localization.
comment:10
ryan — 3 years ago
However if someone manipulates the locale from functions.php, the taxonomies won't reflect that.
@ryan: yours works too, but doesn't fix #10160.
what I was thinking of is to disable the ability to override the default taxonomies.
nm previous comment. second patch works around the problem by doing this twice:
- before plugins and themes are loaded
- on the init hook to enforce localization
- Keywords has-patch added; needs-patch removed
- Severity changed from major to critical
making this a blocker, as it's apparently critical to quite a few users.
comment:15
ryan — 3 years ago
- Status changed from reopened to closed
- Resolution set to fixed
comment:16
ryan — 3 years ago
comment:17
ryan — 3 years ago
Tested with French and Spanish translations and with a couple custom taxonomy plugins.


Works for me in r11082