Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

500 - An error has occurred. joomla user in filter 23 Aug 2013 16:03 #10901

  • BTB300
  • BTB300's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 415
  • Thank you received: 132
Hi Admin,
Another one for you...
(I :lol: as Admin says :angry: "not him again he always finds something wrong")

In my downloaded component
- When Creating Menu Item and setting menu item filters
- if the Joomla user field is set is in the filter you get the following in the modal select window

500 - An error has occurred.
View not found [name, type, prefix]: users, html, mytasksView

Return to Control Panel

Same as here www.j-cook.pro/index.php/forum/closed-ti...-more-than-one#10630

I know you mentioned the issue of access to sandbox user list could be a major issue i guess this is very much related
The following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

Last edit: by BTB300.

500 - An error has occurred. joomla user in filter 23 Aug 2013 16:26 #10904

  • BTB300
  • BTB300's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 415
  • Thank you received: 132
Just to add to ticket and extend a little further something from one of my other posts

can i suggest to have an additional option in the menu filters
- the current user (if its not already done)

Have not tested below code but should be close to what is needed
SELECT 
a.name AS 'name'
, if(a.id = (int) JFactory::getUser()->id  , "CUID", a.id) AS 'ID' // values for id column
, if(a.id = (int) JFactory::getUser()->id  , "Current User", a.username)  AS 'username' // values for username column
, if(a.id = (int) JFactory::getUser()->id , "a.id = (int) JFactory::getUser()->id", a.id ,  'filter.' . $fieldname . 'text' ) AS 'filtertext' // the default value for setState('filter.somefield')
FROM #__dbprefix_users AS 'a'
WHERE a.id=the_filter_id_selected 
OR a.id=(int) JFactory::getUser()->id

This would then display a list like
IDnameusername
1Alexander Adminmr.admin
2Elizabeth Editormrs.editor
3Mary Managermiss.manager
4Garry Guestmr.guest
CUIDCurrent Usercurrentuser

the filtertext field needs to take into account the current field as you can have multiple instances of Joomla User field
such as created_by, modified_by, my_juser, my_juser_wife, my_juser_brother...
hence the code
'filter.' . $fieldname . 'text'

This would allow practically all filter fields of juser to be set to the current user

an example would be

show all records
created by me OR modified by me OR checked out by me
AND WHERE Freds brother is me OR Marys brother is me

....
i think you get the picture

but this would also mean you could show more complex scenarios

As always just another thought

Please Log in or Create an account to join the conversation.

Last edit: by BTB300.

500 - An error has occurred. joomla user in filter 23 Aug 2013 18:24 #10905

  • BTB300
  • BTB300's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 415
  • Thank you received: 132
Just To Add to this again

When Creating the Menu Item
the menu item filters need to have the associated database field name...

Under Requirements i have 4 filters displayed as below

REQIUREMENTS
Select Componentselect component dropdown comboSELECTCLEAR
Select Categoryselect category dropdown comboSELECTCLEAR
Select Usersselect users dropdown comboSELECTCLEAR
Select Usersselect users dropdown comboSELECTCLEAR

Can not tell which one is modified_by or created_by

Should Be displayed as
REQIUREMENTS
Select Componentselect component dropdown comboSELECTCLEAR
Select Categoryselect category dropdown comboSELECTCLEAR
Select modified_by Usersselect modified_by users dropdown comboSELECTCLEAR
Select created_by Usersselect created_by users dropdown comboSELECTCLEAR

And the associated info text when you hover on Select users displays as

Select Users
Select Users

Needs to specify the field name as well
Select modified_by Users
Select modified_by Users

Please Log in or Create an account to join the conversation.

Last edit: by BTB300.

500 - An error has occurred. joomla user in filter 26 Aug 2013 10:35 #10908

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Ok, right.
I am currently working on this.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

500 - An error has occurred. joomla user in filter 26 Aug 2013 13:07 #10910

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Fixed.
Should be better now.

But still not available the option to auto filter with the current logged user.
This option is very good and I am gonna do it.
But remember that those params are sent by URL so it is not a security filter !

For layouts which needs a secure filtering, use PHP and authoring.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

500 - An error has occurred. joomla user in filter 26 Aug 2013 16:14 #10911

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Now I have added the ability to select automatically the current user.

It have been a hard work, but very important.
Can you tell me if I have answered your ticket ?
Coding is now a piece of cake
The following user(s) said Thank You: BTB300

Please Log in or Create an account to join the conversation.

500 - An error has occurred. joomla user in filter 29 Aug 2013 18:13 #10929

  • BTB300
  • BTB300's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 415
  • Thank you received: 132

admin wrote: Can you tell me if I have answered your ticket ?

Testing Now...

Please Log in or Create an account to join the conversation.

500 - An error has occurred. joomla user in filter 29 Aug 2013 18:56 #10930

  • BTB300
  • BTB300's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 415
  • Thank you received: 132
Wonderful
- Fixed !!!
- AND A new functionality can be listed for COOK 2.5

I am sure that you will get many thanks from everyone that has been waiting for the the long awaited "My View"

The road map is long but you just ticked another task off your list

Thank you for your continuous support and development we used to say that Cook was evolving but now it think we can say its "hatched"
K++
The following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

Last edit: by BTB300.

500 - An error has occurred. joomla user in filter 29 Aug 2013 19:03 #10931

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
And thank to your wonderfull debuging help as well.

When I have time I'll put you a badge "Better tester" on your forum profile.
Coding is now a piece of cake
The following user(s) said Thank You: BTB300

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.081 seconds
  I still don't believe he can really be human to do all this ! From all of the forums that I've ever participated in this is certainly the one that most encapsulates the feeling of being truly open source where everyone's opinions and contributions can and will shape the development of the service! It's truly awesome! Hope you enjoy cooking and look forward to reading and contributing to any of the editorial work that you proposed too!! Thanks
Gez (audibleid - JED)

Get Started