Hello, I'm currently following this tutorial: https://www.itophub.io/wiki/page?id=latest:customization:add-profile-sample. I've installed the extension and copied and pasted the exact XML code into the correct file. But when I assign a user one of the roles created from the extension and attempt to log in I get the following:
"Error: No result for the single row query."
And in the error logs I get this:
'SELECT
DISTINCT Contact.id AS Contactid, Contact.name AS Contactname, Contact.status AS Contactstatus, Contact.org_id AS Contactorg_id, Organization_org_id.name AS Contactorg_name, Contact.email AS Contactemail, Contact.phone AS Contactphone, Contact.notify AS Contactnotify, Contact.function AS Contactfunction, Contact.finalclass AS Contactfinalclass,
IF((Contact.finalclass IN (\'Team\', \'Contact\')), CAST(CONCAT(COALESCE(Contact.name, \'\')) AS CHAR), CAST(CONCAT(COALESCE(Contact_poly_Person.first_name, \'\'), COALESCE(\' \', \'\'), COALESCE(Contact.name, \'\')) AS CHAR)) AS Contactfriendlyname,
COALESCE((Contact.status = \'inactive\'), 0) AS Contactobsolescence_flag, Contact.obsolescence_date AS Contactobsolescence_date,
CAST(CONCAT(COALESCE(Organization_org_id.name, \'\')) AS CHAR) AS Contactorg_id_friendlyname,
COALESCE((Organization_org_id.status = \'inactive\'), 0) AS Contactorg_id_obsolescence_flag
FROM contact AS Contact
INNER JOIN organization AS Organization_org_id
ON Contact.org_id = Organization_org_id.id
LEFT JOIN person AS Contact_poly_Person
ON Contact.id = Contact_poly_Person.id
WHERE ((Contact.id = 100) AND 0)
',
)
The user has a person assigned and I've set the same organization the person has to the User's allowed organizations as this was a common solution to this problem. I don't want to assign a preexisting profile to the user along with the custom one since I am trying to restrict writing rights for some features. Nothing seems to be working.
Last edit: John S 2024-11-27
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, I'm currently following this tutorial: https://www.itophub.io/wiki/page?id=latest:customization:add-profile-sample. I've installed the extension and copied and pasted the exact XML code into the correct file. But when I assign a user one of the roles created from the extension and attempt to log in I get the following:
"Error: No result for the single row query."
And in the error logs I get this:
'SELECT
DISTINCT
Contact
.id
ASContactid
,Contact
.name
ASContactname
,Contact
.status
ASContactstatus
,Contact
.org_id
ASContactorg_id
,Organization_org_id
.name
ASContactorg_name
,Contact
.email
ASContactemail
,Contact
.phone
ASContactphone
,Contact
.notify
ASContactnotify
,Contact
.function
ASContactfunction
,Contact
.finalclass
ASContactfinalclass
,IF((
Contact
.finalclass
IN (\'Team\', \'Contact\')), CAST(CONCAT(COALESCE(Contact
.name
, \'\')) AS CHAR), CAST(CONCAT(COALESCE(Contact_poly_Person
.first_name
, \'\'), COALESCE(\' \', \'\'), COALESCE(Contact
.name
, \'\')) AS CHAR)) ASContactfriendlyname
,COALESCE((
Contact
.status
= \'inactive\'), 0) ASContactobsolescence_flag
,Contact
.obsolescence_date
ASContactobsolescence_date
,CAST(CONCAT(COALESCE(
Organization_org_id
.name
, \'\')) AS CHAR) ASContactorg_id_friendlyname
,COALESCE((
Organization_org_id
.status
= \'inactive\'), 0) ASContactorg_id_obsolescence_flag
FROM
contact
ASContact
INNER JOIN
organization
ASOrganization_org_id
ON
Contact
.org_id
=Organization_org_id
.id
LEFT JOIN
person
ASContact_poly_Person
ON
Contact
.id
=Contact_poly_Person
.id
WHERE ((
Contact
.id
= 100) AND 0)',
)
The user has a person assigned and I've set the same organization the person has to the User's allowed organizations as this was a common solution to this problem. I don't want to assign a preexisting profile to the user along with the custom one since I am trying to restrict writing rights for some features. Nothing seems to be working.
Last edit: John S 2024-11-27