Project

General

Profile

Actions

Bug #39056

closed

Tagging of latest extension not possible due to

Added by Jan Schreier almost 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Won't have this time
Assignee:
-
Category:
Extension Manager
Target version:
-
Start date:
2012-07-18
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I noticed this and put it as comment into another bug (http://forge.typo3.org/issues/38406#note-1) but think that it is of higher importance, that is why I created this issue:

the problem lies in the function "insertLastVersion" in the file:
"/typo3/sysext/em/classes/database/class.tx_em_database.php"
current code:

$groupedRows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
'extkey, version, max(intversion) maxintversion',
'cache_extensions',
'repository=' . intval($repositoryUid),
'extkey'
);

the goal is to identify the highest version for each extension and assign this row the value lastversion=1.

so the code should be:

$groupedRows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
'extkey, max(intversion) as maxintversion',
'cache_extensions',
'repository=' . intval($repositoryUid),
'extkey'


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #38406: Extension Import not working with postgresql and DBALClosed2012-06-26

Actions
Actions #1

Updated by Ernesto Baschny almost 12 years ago

Is your issue something "different" than #38406? If not, why would we need another issue? If its the same, we should close this one and give the original one the required attention. Thanks!

Actions #2

Updated by Ernesto Baschny almost 12 years ago

  • Status changed from New to Needs Feedback
Actions #3

Updated by Jan Schreier almost 12 years ago

Hi Ernesto, the described problem in 38406 is a different one but the the area where it points to is the same. thus if you take a short look into it and do what I suggest there, you may well close this one. Just didn't know how to raise attention otherwise. BR!

Actions #4

Updated by Ernesto Baschny almost 12 years ago

For us to understand the problem it would be good to have "steps to reproduce" in your report, which means: what should I do (for example in the extension manager) to see the bug happening? First we need to understand what's wrong then we can concentrate on the solution.

And we appreciate that you already jumped in with a potential solution.

Thanks for your help!

Actions #5

Updated by Jan Schreier almost 12 years ago

The problem is that with the current SQL statement you will never find any hint telling you that there is an extension update available - even if there is one in your local cache_extension table because the flag "is latest version" is not set for any extension. So the first step would be to check for one or two sample extension in this table if the lastersion is set correctly. I get a timeout before these updates happens because due to the nature of the current script each version for each extension is tried to be updates with lastextension =1 and this is done not in one statement but in 29k separate statements. hope that helps!

Actions #6

Updated by Ernesto Baschny almost 12 years ago

Since I've successfully updated tons of extensions already using the new EM, I would be glad if you give us more information on "where to click" and "what you expect" and "what you see otherwise". This is what I meant with "steps to reproduce". What exactly (for the user) is broken because of this bug?

For example in the EM, I go to

  • Import Extensions
  • Update the extension list
  • Go to "Available Extensions"
  • Filter by "Only display updateable extensions"
  • I get a list of local extensions that require update
  • Hovering over the icon to update I see which is the current and the new versions

So for me it looks like it is working correctly? Or is some specific update "hidden" because of the bug? Do you have an example?

See my point?

Actions #7

Updated by Jan Schreier almost 12 years ago

Hi Ernesto,

I think I owe you a beer for your time (would it reach you at the cron-it address?). My problem still exists according to your description I never see any result if I filter "Only display updateable extensions". I just checked it again and the "version" in the described lines is not the reason why this check fails on my environment (although it is data never used within the function insertLastVersion nor is it returned. so you can close this issue and I try to find the reason for the timeout that prevents my environment from completing this function.

Actions #8

Updated by Ernesto Baschny almost 12 years ago

So you are using DBAL and any "exotic" database (postgreSQL or oracle)? Or just plain MySQL?

We have plenty of beer in stock here at cron it, thanks! :)

Actions #9

Updated by Jan Schreier almost 12 years ago

no, for me it is pure mysql.

Actions #10

Updated by Ernesto Baschny almost 12 years ago

  • Status changed from Needs Feedback to Closed
  • Priority changed from Must have to Won't have this time
  • TYPO3 Version changed from 4.7 to 4.5

So I'll close this for now, but I understand that the query is not running on DBAL anyway, so the related issue #38406 is probably still open and the proposed solution (also by removing the unneeded "version" from the query) sounds reasonable, although I cannot test or verify it.

Actions

Also available in: Atom PDF