Skip Navigation

[Resolved] Unable to Filter a View by Username per the Documentation

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 8 replies, has 3 voices.

Last updated by Bigul 8 years, 2 months ago.

Assigned support staff: Bigul.

Author
Posts
#110968
Views Reviews by Author 070513.jpg

I have very carefully followed the documentation at https://toolset.com/documentation/user-guides/filtering-views-query-by-author/ to try to set up an archive I can select by post author.

When I set up the filter to work as part of a view that links to a page based on the author's ID, I can then use the ID (e.g. hidden link), to retrieve an author specific archive. I can successfully view custom posts in the author archive for either of two authors (ID=4, ID=1).

However, when I try set it up to work by Username, which is what I really want, changing nothing else in the View but this filter, all I get back is the "No posts found" response regardless of how I have tried to enter the Username. Here are two examples of the links I am trying to use per the default "by Username" settings:
- hidden link
- hidden link

Without question, those are valid user names, as confirmed by this author link from the blog page of the site, which works perfectly for standard posts:
hidden link

So to my questions:
1. Am I not structuring the link correctly? Your examples use "Joe Foo" and "Peter Bar". I tried the actual usernames first with no success. I then tried a few variations of the "human readable names", also with no success, e.g. in " ", with no space, with a space with an underline for the space, with a %20 for the space.
2. Is there something I'm missing as far as how to use set up or ask the custom posts by username that I'm missing or that is not documented clearly?
3. Is there something in Views that isn't working properly?

Thanks, in advance for your help. I'm very anxious to fix this issue so I can move forward with a client.

Scott Simpson

#111812

Dear scottS-3,

The View looks like ok, I think that can there is any cache involved, please try to remove the current View and create other.

#112161

Adriano,

I was a bit skeptical, but I tried your suggestion.

I deleted/trashed the existing View, created a new one (with a new name) with the same construct , added in the author filter and then added the view to a page created to hold the author archive. I then tried to versions of the link to access the page:
1. This simple query, which returned the two "Reviews" (custom posts) for the author "srichardson, as no filter was specified - hidden link
2. Tried this query which should have returned the same two posts (there are only two posts by this one author in the "Reviews" custom post type), but now based on filtering the posts by username - hidden link Again, I received the "No posts found" message.

To me, it appears that it is recognizing that I'm asking for a filter to be applied, but for some reason, be it the syntax of the link or the attempt to process the username that is "reads" as it processes the link, it is unable to find or output the two custom posts written by "srichardson".

Looking forward to next steps.

Scott Simpson

#112284

Bigul
Supporter

Dear Scott,

We are not able to replicate it here. Normally it should work. Therefore please let me know about the following to track the issue.

1) Views Version
2) WordPress version
3) Plug-ins you are using
4) Theme
5) PHP version and OS

Also please try the following, if possible.

1) Please take a backup. Then deactivate other plug-ins and check it is working or not
2) If issue exist, please switch to default 2012 theme and check it is working or not

--
With Regards

Bigul

#112503
Untitled.jpg

Bigul,

Thanks for your feedback.

Here is the info per your request:
1) Views Version - 1.2.3
2) WordPress version - 3.5.2 in a network installation
3) Plug-ins you are using (see attached picture)
4) Theme - iThemes.com Builder core (4.2.2) and customized iThemes.com Avail child theme (4.0.1)
5) PHP version and OS - PHP 5.2.17 on Apache Linux (I don't know how to get any more specific info on this) on a shared hosting plan from Hostgator.com

My next step will be to try to try the additional steps (1 & 2) that you requested to see if I can isolate what might be causing the problem, be it a theme, plugin, etc.

I'll report on that once I am able to do that.

Scott Simpson

#112710

Bigul
Supporter

Dear Scott,

Thank you for the details. I will try to replicate it here and update you. Please wait.


With Regards

Bigul

#115322

Bigul
Supporter

Dear Scott,

It was a views bug and we have fixed it. I have sent you a patch version for this bug. Please take a backup and try it.


With Regards

Bigul

#115342

Bigul,

That did the trick! You have made by day in THREE ways:
1) I didn't spend any time "messing around" trying to do any further diagnosis after your post of July 11th, which we now know would have been a waste of time for me - Time saved!
2) I was already impressed by Toolset . . . now I'm even more impressed based on the commitment of the support team to stand behind the product.
3) I can revise the client site and implement a "way cool" Author Archive for the custom post type that I created rather than defeating that functionality.

If you would be so kind, I have a couple of followup questions:
1) At a high level, what was "tripping up" Views? Was it a version of something in my unique combination of php, WordPress, a network installation, etc. that you hadn't been able to test for? As an engineer by background who has developed software code, I'm just curious.
2) When might this fix be rolled into the production version of Views? This will help me understand if I may need to use the patch in future installations.

Thanks again for all of your help!!!

#115352

Bigul
Supporter

Dear Scott,

Thank you.

We are using latest version of WordPress always. In this case WordPress 3.5.2. PHP is 5.3.* series. This fix will be included in Views 1.2.4.

Bruce and Juan are our Views developers.


With Regards

Bigul