Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.0.17] Massive amount of duplicate database queries for template_styles #379

Open
codeling opened this issue Nov 22, 2023 · 11 comments
Open

Comments

@codeling
Copy link

codeling commented Nov 22, 2023

Steps to reproduce the issue

Use helixultimate template, set site to debug.

Expected result

Limited or no amount of duplicate database queries.

Actual result

The following query is executed 117 times:

SELECT *
FROM `#__template_styles`
WHERE `client_id` = 0 AND `id` = '9'

(client_id and id are probably specific to my setup, but you get the gist)

The query is executed from plugins/system/helixultimate/src/Platform/Helper.php:54

System information (as much as possible)

Joomla 4.4.0. apache 2.4.57 on Ubuntu 23.10.

@joomleb
Copy link

joomleb commented May 27, 2024

@codeling
Please, Can you replicate the issue with last Joomla 4.4.5 + Helix Ultimate 2.1.1 ?
Which version of PHP are you running?

@codeling
Copy link
Author

codeling commented May 29, 2024

@joomleb In my current attempt on the starting page of our website I see 112 reports of the duplicate query as shown in my initial report, so yes, I can still replicate this.

Is there anything else I can do to help here? I have little knowledge with how the Joomla templating system works or how helix-ultimate uses it (or whether the duplicate queries are even a real problem - it just seems so strange to me to do the same query so many times), so I don't really know where I could look for more information. I do have php development experience so with some guidance I might be able to find out more about whether this is something unique to our setup or a more general thing.

@joomleb
Copy link

joomleb commented May 29, 2024

@mi-prakash @ahamed
Please, Can you help here at least giving to @codeling (thank you) the right instructions to help all of us ?

@HDsports
Copy link

HDsports commented Sep 2, 2024

i have exactly the same problem. Is there no solution?
455603011_2161950720843898_4660889128114951317_n

@Sieger66
Copy link

Sieger66 commented Sep 3, 2024

Everyone can test a temporary fix from there:

https://forum.joomla.de/thread/21364-helix-template-1-000-mal-die-gleichen-queries/?postID=158848#post158848

for the file:
/plugins/system/helixultimate/src/Platform/Helper.php

the changed function is:

public static function getTemplateStyle($id = 0)
{
static $cache = [];
if (isset($cache[$id])) {
return $cache[$id];
}
$db = Factory::getDbo();
$query = $db->getQuery(true);
$query->select(array('*'));
$query->from($db->quoteName('#__template_styles'));
$query->where($db->quoteName('client_id') . ' = 0');
$query->where($db->quoteName('id') . ' = ' . $db->quote($id));
$db->setQuery($query);
$cache[$id] = $db->loadObject();
return $cache[$id];
}

@joomleb
Copy link

joomleb commented Sep 3, 2024

@Sieger66
Thank you for helping. To avoid mistakes, Please, Can you add here the modded helper.php file to replace ?

@mi-prakash
Please, Do you have any news about this fixing ?

@joomleb
Copy link

joomleb commented Nov 8, 2024

@mi-prakash @ahamed
Please, Can you confirm the fixing adding as suggested by @Sieger66 ?

@HDsports
Copy link

HDsports commented Nov 8, 2024

The fix was made more than two months ago and Joomshaper doesn't even bother to respond. Wow, terrible support :(

@joomleb
Copy link

joomleb commented Jan 12, 2025

@mi-prakash @ahamed
Please, Is Helix Ultimate an abandoned project?

@HDsports
Copy link

HDsports commented Jan 12, 2025

I don't think so. Joomsharp support is simply miserable. Helix is the free template from JoomShaper. The developers don't even seem to think it's worth investing a few minutes of their time to fix the error. This is very shameful for such a company.

@Sieger66
Copy link

Sieger66 commented Jan 31, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants