Recently I found a strange behavior in Alfresco. I reproduced the behavior when logged in ADF application on Internet Explorer changed the name of a site then logged in Chrome/Firefox and the changes can't be seen. I query the database using the following query:
SELECT n.id AS "Node ID",
n.store_id AS "Store ID",
n.uuid AS "Site ID (UUID)",
p.string_value AS "Site Name",
p1.string_value AS "Site Description",
p2.string_value AS "Site Visibility",
n.audit_created AS "Creation Date",
n.audit_modified AS "Modification Date"
FROM alf_node AS n,
alf_node_properties AS p,
alf_node_properties AS p1,
alf_node_properties AS p2,
alf_qname AS q
WHERE n.type_qname_id=q.id
AND p.node_id=n.id
AND p1.node_id=n.id
AND p2.node_id=n.id
AND p.qname_id IN (SELECT id FROM alf_qname WHERE local_name='name')
AND p1.qname_id IN (SELECT id FROM alf_qname WHERE local_name='description')
AND p2.qname_id IN (SELECT id FROM alf_qname WHERE local_name='siteVisibility')
AND q.local_name='site';
The results are:
The first two rows are the same with the same Site ShortName and same Node Id. The only things that are different is the Site Title.
What can be the cause ? How can be fixed?
You are not selecting the site title. You are missing the relevant "title" property for this. The name (short name) of a site can never be changed after creation. Whatever you are changing to rename a site is always the title.
Yes, you’re right about it but my problem is why it returns 2 sites of “hr” short name instead of one. This appears when I update a site title from IE.
Your query performs a simple cross-join instead of a proper left-join. This unnecessarily duplicates the results. This is completely unrelated to Alfresco which performs a correct query.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.