I have been using a system for page-specific metatags on my early MODx sites that works like this:
I create a Chunk: {{metaTags}}
The Chunk has the following content:
<link rel="shortcut icon" href="/favicon.ico" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="Description" content="[*metaDescription*]" />
<meta name="Keywords" content="[*metaKeywords*]" />
Then, I create Template Variables as called in the Chunk: metaDescription, etc.
I give it the Input Type: Textarea (Mini) with no default value and assign it to the templates used in the public part of the site.
Then, as I go through the site, I can use the QuickEdit floating toolbar to open Textarea editing windows on each page and put in descriptions and keywords while I’m actually looking at the page and it’s content.
This has worked like a charm right up until the current site I’m building. Now, when I open the Textarea window to edit the metatag content, I get the following error every time I try to save:
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« Execution of a query to the database failed - Table ’db158115611.modx_’ doesn’t exist »
SQL: UPDATE modx_ SET editedon=’’,editedby=’1146767221’ WHERE id = ’1’;
[Copy SQL to ClipBoard]
Parser timing
MySQL: 0.0029 s s (4 Requests)
PHP: 1146767221.6646 s s
Total: 1146767221.6676 s s
If I create a default value in the Resource manager, that works fine, but I do this in order to edit metatags on the frontend...so that doesn’t solve the problem. All the other content editors work fine (Document Content, etc), it’s only the new TVs I create in the Resource Manager that do this. I don’t seem to have any other problem with SQL queries (which is what the error message references) in any other function on the site. I’ve repaired the MySQL tables, checked all my settings, etc. and find no problems.
The only differences between this site and the ones that are working is that this site throwing the error is running 092. The others are running 091.
Any ideas? I’ve done/checked everything I can think of, so I’m wondering if 0.9.2 has a bug in new TVs.
Thanks!
Duane
Hello,
I’ve got exactly the same error. After searching, I’ve found the reasons.
1. a bug in assets/modules/quick_edit/editor.class.inc.php (the name of table has been forgotten)
around line 309, replace :
$modx->db->update(array(’editedon’=>$now, ’editedby’=>$time), "{$pre}", "id = ’{$doc_id}’");
//with
$modx->db->update(array(’editedon’=>$now, ’editedby’=>$time), "{$pre}site_tmplvar_contentvalues", "id = ’{$doc_id}’");
2. this line is supposed to update two fields editedon and editedby but they don’t exists in the table "modx_site_tmplvar_contentvalues" so you have to add them manually (int(20) and int(10) with null allowed) , then it works fine !
Please keep me in touch.
do you know how to share this bug solution with official support ? thank you
-
☆ A M B ☆
- 24,524 Posts
I used this file, and couldn’t get an installation. Probably something to do with different versions of mysql, although there were no error messages, in fact the install went along reporting success until it tried to start inserting modules and snippets; the tables were never actually created. I switched back to the original files and all went well as usual.
after adding that two columns to the table... modx store something there?
its always null...
Quote from: dcontact at May 04, 2006, 04:32 PMPlease keep me in touch.
Thanks a lot for this !
Solves it for me
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id