Report any technical problems you discover and discuss solutions.

Invalid template_id (could not find in DB)

  • cgoacher
  • Onderwerp Auteur
  • Offline
  • Junior lid
  • Junior lid
Meer
11 jaren 8 maanden geleden #2454 door cgoacher
Invalid template_id (could not find in DB) werd gestart door cgoacher
Hi,

It's been brought to my attention that when users login to our Xerte installation they are no longer seeing their list of projects and only see a workspace folder and a recycle bin. If I login to the management.php page I am still able to see the missing content listed in the user templates area. However any projects that I have tried to edit from this area, upon clicking the Edit button, I am then presented with the error 'Invalid template_id(could not find in DB)'. However it looks like the files are still present on the server and seems that existing published content is still working when accessed directly.

To the best of my knowlegde this has only happened relatively recently. I know that the system was being used without any complaints last week and nobody is aware of any changes to the web server or database server. If I'm honest though my workload hasn't allowed me to spend much time on this system at all since I inherited it about 6 months ago so I was wondering if somebody could offer some advice to help me troubleshoot this issue?

Many thanks in advance.

Thanks

Craig Goacher

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

  • cgoacher
  • Onderwerp Auteur
  • Offline
  • Junior lid
  • Junior lid
Meer
11 jaren 8 maanden geleden #2459 door cgoacher
Beantwoord door cgoacher in topic Invalid template_id (could not find in DB)
Hi,
Upon further investigation we've traced an error back to the db_query_one in the edit.php page. The query it runs is as follows:
Code:
select originaltemplatesdetails.template_name, logindetails.username, originaltemplatesdetails.template_framework, templaterights.user_id, templaterights.folder, templaterights.template_id, templatedetails.access_to_whom from originaltemplatesdetails, templaterights, templatedetails, logindetails where templatedetails.template_type_id = originaltemplatesdetails.template_type_id and templatedetails.creator_id = logindetails.login_id and templaterights.template_id = templatedetails.template_id and templaterights.template_id="637" and role="creator"

It seems to be unhappy with the use of double quotes around the id and role values. The same query returns unknown column errors in MySQL workbench but if the double quotes are changed to single quotes we do then have results returned.

Nobody is aware of any changes happening to either Xerte, Database server or Web server so I'm very confused as to why this has only just become a problem. Is anybody aware of anything that could affect this?

Thanks

Craig

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

  • cgoacher
  • Onderwerp Auteur
  • Offline
  • Junior lid
  • Junior lid
Meer
11 jaren 8 maanden geleden #2460 door cgoacher
Beantwoord door cgoacher in topic Invalid template_id (could not find in DB)
Hi, it looks like we've got to the bottom of this now and should this help anybody in the future...

It seems that somehow a global MySQL setting 'SQL mode' has been set to ANSI Quotes which prevents the use of double quotes. Once this option was blanked out (allowing double quotes), Xerte has now started working again.

Thanks

Craig

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

Moderators: ronmjultenJohnSmith
Tijd voor maken pagina: 0.232 seconden
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo