Views to use currentlylogged in UID or override via URL I have followed this:

Drupal 7 views, filter by owner

I have a situation where I want the view to show only results by author UID of currently logged in user and/or have the URI explicitly provide the UID.

I can get one or the other to work but not both -- the URI scheme I have is:

http://mydomain.local/myproject/%/test/test.html

I was thinking the placement of the % might affect the results -- it does not.

Ideally when someone access the page:

http://mydomain.local/myproject/test/

And they are logged in the see the results specific to them

When someone accesses the page:

http://mydomain.local/myproject/3/test

The see only the results for the specific user UID = 3

Any ideas???
I think what you're going to need to do is clone your display. One display using path 'myproject/test' where you contextual filter uses 'Provide default value' when the filter is not in the URL, with 'User ID from the logged in user' as the type.

The other display will use the path 'myproject/%/test' and since the filter in this case IS provided by the URL, you can do something like 'Show "Page not Found"' if the filter value is not provided by the URL. You'll probably also want to specify a validation criteria using the numeric validator with 'Show "Page not found"' as the action to take if it doesn't validate.