modxcms / revolution

MODX Revolution - Content Management Framework
https://modx.com/
GNU General Public License v2.0
1.35k stars 528 forks source link

SQL error affecting package manager #10680

Closed feamsr00 closed 10 years ago

feamsr00 commented 14 years ago

feamsr00 created Redmine issue ID 10680

Hi, I'm observing some odd behavior with package manager on a new install of Revo-rc2. When getting packages from the repository, they download, and appear to extract on the file system, but they never show up in the the package workspace. In addition I have found the following error in the error log multiple times. [2010-06-18 14:37:14] (ERROR @ /connectors/workspace/packages.php) Error 42S22 executing statement: Array ( [0] => 42S22 [1] => 1054 [2] => Unknown column '' in 'order clause' ) In case it mattered, I have double checked that curl and sockets are enabled, which they are (libcurl/7.19.6 OpenSSL/0.9.8k zlib/1.2.3). Please let me know if you need any additional information. Thanks in advance.

splittingred commented 14 years ago

splittingred submitted:

Strange. I can't replicate this. Let's try and pinpoint exactly where this is happening. A few things. 1. Does this happen on all browsers? Or is it browser-specific?

  1. This is when you view the package grid, right?
  2. So from what I understand, you've downloaded a package - did it get added to the modx_transport_packages table? Can you check that for me? If it's not in there, we have another issue. Try deleting the core/cache/logs/error.log file, and then repeating your steps. See what errors come out. Also, if you get any JS errors, let me know about those as well.
feamsr00 commented 14 years ago

feamsr00 submitted:

OK so, this is strange indeed. Its now confirmed on 3 diverse servers: ) Win2k3 std 64b with IIS 6.0 PHP 5.2.11 (via ZendServer) ) Win2k3 std 64b with Apache 2.2.14.0 PHP 5.3.0 (via ZendServer) ) Linux SMP 64b with Apache 1.x PHP 5.2.13 Same MySQL for all 5.0.37 Clients range from Chrome, to FF, to IE JS testing done with FF w/ Firebug, no errors Packages appear in the db and the fs (extracted too). Isolated errors same as before: fresh from error.log [2010-06-23 01:50:21](ERROR @ /connectors/workspace/packages.php) Error 42S22 executing statement: Array ( [0] => 42S22 [1] => 1054 [2] => Unknown column '' in 'order clause' ) So... either its a crazy code issue, or... MySQL? If so, I've included maybe relevant MySQL vars. Variable_name Value character_set_database latin1 character_set_filesystem binary character_set_results utf8 character_set_server latin1 character_set_system utf8 collation_database latin1_swedish_ci collation_server latin1_swedish_ci sql_mode REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI version 5.0.37-community version_compile_os Win64

splittingred commented 14 years ago

splittingred submitted:

Willing to bet it has something to do with your character sets being mismatched. Are you using UTF-8 or latin1 in your install?

feamsr00 commented 14 years ago

feamsr00 submitted:

Latin1 character set/collation for everything... Data below: L9-L10 of config.inc.php $database_connection_charset = 'latin1'; $dbase = 'modxtemp18'; mysql> SELECT t.table_schema, t.table_name, t.table_collation FROM information_schema.TABLES as t where t.table_schema='modxtemp18'; table_schema table_name table_collation modxtemp18 modx_access_actiondom latin1_swedish_ci modxtemp18 modx_access_actions latin1_swedish_ci modxtemp18 modx_access_context latin1_swedish_ci modxtemp18 modx_access_elements latin1_swedish_ci modxtemp18 modx_access_menus latin1_swedish_ci modxtemp18 modx_access_permissions latin1_swedish_ci modxtemp18 modx_access_policies latin1_swedish_ci modxtemp18 modx_access_resource_groups latin1_swedish_ci modxtemp18 modx_access_resources latin1_swedish_ci modxtemp18 modx_access_templatevars latin1_swedish_ci modxtemp18 modx_actiondom latin1_swedish_ci modxtemp18 modx_actions latin1_swedish_ci modxtemp18 modx_active_users latin1_swedish_ci modxtemp18 modx_categories latin1_swedish_ci modxtemp18 modx_content_type latin1_swedish_ci modxtemp18 modx_context latin1_swedish_ci modxtemp18 modx_context_resource latin1_swedish_ci modxtemp18 modx_context_setting latin1_swedish_ci modxtemp18 modx_document_groups latin1_swedish_ci modxtemp18 modx_documentgroup_names latin1_swedish_ci modxtemp18 modx_element_property_sets latin1_swedish_ci modxtemp18 modx_event_log latin1_swedish_ci modxtemp18 modx_keyword_xref latin1_swedish_ci modxtemp18 modx_lexicon_entries latin1_swedish_ci modxtemp18 modx_manager_log latin1_swedish_ci modxtemp18 modx_member_groups latin1_swedish_ci modxtemp18 modx_membergroup_names latin1_swedish_ci modxtemp18 modx_menus latin1_swedish_ci modxtemp18 modx_namespaces latin1_swedish_ci modxtemp18 modx_property_set latin1_swedish_ci modxtemp18 modx_register_messages latin1_swedish_ci modxtemp18 modx_register_queues latin1_swedish_ci modxtemp18 modx_register_topics latin1_swedish_ci modxtemp18 modx_session latin1_swedish_ci modxtemp18 modx_site_content latin1_swedish_ci modxtemp18 modx_site_content_metatags latin1_swedish_ci modxtemp18 modx_site_htmlsnippets latin1_swedish_ci modxtemp18 modx_site_keywords latin1_swedish_ci modxtemp18 modx_site_metatags latin1_swedish_ci modxtemp18 modx_site_plugin_events latin1_swedish_ci modxtemp18 modx_site_plugins latin1_swedish_ci modxtemp18 modx_site_snippets latin1_swedish_ci modxtemp18 modx_site_templates latin1_swedish_ci modxtemp18 modx_site_tmplvar_access latin1_swedish_ci modxtemp18 modx_site_tmplvar_contentvalues latin1_swedish_ci modxtemp18 modx_site_tmplvar_templates latin1_swedish_ci modxtemp18 modx_site_tmplvars latin1_swedish_ci modxtemp18 modx_system_eventnames latin1_swedish_ci modxtemp18 modx_system_settings latin1_swedish_ci modxtemp18 modx_transport_packages latin1_swedish_ci modxtemp18 modx_transport_providers latin1_swedish_ci modxtemp18 modx_user_attributes latin1_swedish_ci modxtemp18 modx_user_group_roles latin1_swedish_ci modxtemp18 modx_user_messages latin1_swedish_ci modxtemp18 modx_user_roles latin1_swedish_ci modxtemp18 modx_user_settings latin1_swedish_ci modxtemp18 modx_users latin1_swedish_ci modxtemp18 modx_workspaces latin1_swedish_ci 58 rows in set (0.44 sec) mysql> SELECT s.schema_name,s.default_character_set_name, s.default_collation_name FROM information_schema.SCHEMATA as s where s.schema_name='modxtemp18' schema_name default_character_set_name default_collation_name modxtemp18 latin1 latin1_swedish_ci 1 row in set (0.00 sec)

feamsr00 commented 14 years ago

feamsr00 submitted:

Ok, I've upgraded to MySQL 5.1.48, and revo-pl and I still can reproduce this failure. If there are no ideas on solving this, then whats a recommended way to debug/research this? Do you have any design docs on the operation of the package manager? How does package manager install a package, and how would this be done manually? Better yet, at least in theory, are there any kind of unit tests for the package manager that I can run?

garryn commented 10 years ago

This ticket is relating to such an old version of Revolution, I'm closing it. Please reopen if this SQL error is still present in the most current version of Revolution (2.2.14pl).