modmore / VersionX

Resource & Element Versioning Extra for MODX Revolution (supports 2.2 and up). Extends the core in a future-proof manner to keep copies of every change to resources, templates, template variables, chunks, snippets and plugins.
https://modmore.com/extras/versionx/
40 stars 20 forks source link

Unknown column 'name' in 'order clause' #73

Closed weitblick closed 9 years ago

weitblick commented 9 years ago

on save a resource I always get this error in error log (only in MODX 2.3.2! no problem at MODX 2.3.1 and early): (ERROR @ /connectors/index.php) Error 42S22 executing statement: Array ( [0] => 42S22 [1] => 1054 [2] => Unknown column 'name' in 'order clause' )

weitblick commented 9 years ago

I reproduced it on a plain installation on modxcloud: install/update 2.3.2, install versionx, save recource on time, look into error-log

intersel commented 9 years ago

What the impact of this error? any lead to fix the problem?

edit:Impact -> impact on plugin based on 'onDocFormSave' event and following...

It tries to do execute the following query: SELECT modClassMap.id AS modClassMap_id, modClassMap.class AS modClassMap_class, modClassMap.parent_class AS modClassMap_parent_class, modClassMap.name_field AS modClassMap_name_field, modClassMap.path AS modClassMap_path, modClassMap.lexicon AS modClassMap_lexicon FROM modx_class_map AS modClassMap ORDER BY name ASC LIMIT 20

with order by clause that does not work on 'name' field.... Don't succeed to figure out where this clause order by is set...

blue148 commented 9 years ago

I can verify that the error is also happening in 2.3.3. The impact is that it fills up the error log due to loggin gon each save of a resource.

BearsFan commented 9 years ago

Hi, I can also confirm I'm seeing this error on a few of my sites. Did anyone find a fix for this?

swbraun commented 9 years ago

Same error here.

sylbal commented 9 years ago

Hi all,

Same error here, using ModX-2.3.3.

70hundert commented 9 years ago

looking for a fix for this as well. MODx 2.3.3 using VersionX 2.1.0

Mark-H commented 9 years ago

Thanks @intersel for tracking down what query was causing the error, that was a great help in tracking this one down.

SnowCreative commented 9 years ago

That fix doesn't work for me. When I install it, then try to save a document, I get the "please correct the errors in your form before submitting" message, and the Versions tab wants me to enter something into the Resource Type field, which is blank. I'm running MODX 2.3.5.

indygfx commented 9 years ago

The same behavior in my installation "please correct the errors in your form before submitting". So the fix doesn’t work. We are running modx vers. 2.3.3-pl

Mark-H commented 9 years ago

@indygfx (and @rainbowtiger), that is a different bug #78 that was fixed in VersionX 2.1.2. Make sure you're on that version.

BearsFan commented 8 years ago

Hi Mark, I have updated VersionX to the latest/confirmed that the fix above is in/, but I'm still getting that error when I save a resource....I have cleared cache, is there anything else to do post upgrade?