-
☆ A M B ☆
- 237 Posts
Sorry:
MySQL: 4.1.22
PHP: 5.3.2
Apache: 2.2.16
-
☆ A M B ☆
- 237 Posts
I did this using Ditto and it works just fine. So, something seems to be wrong with getResources or my current configuration clashes with it.
It looks like Ditto is going to be abandoned. So, what do I do with this? Any thoughts?
-
☆ A M B ☆
- 237 Posts
I just started attempting to add a blog to this site and realized it also requires getResources.
I really need some help here. Has anyone else had the problem I’m having? Anyone have any thoughts at all on this?
Thanks in advance.
Hard to say without:
- Your snippet call
- Your tpl chunk
- Any errors in core/cache/logs/error.log
- Etc.
shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect |
github |
splittingred.com
-
☆ A M B ☆
- 237 Posts
This is the error I get when calling just [[getresources]]
[2010-09-13 16:34:02] (ERROR @ /index.php) Error 42000 executing statement: Array (
=> 42000 [1] => 1064 [2] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,19,17) AND (`modResource`.`context_key’ at line 1 )
Here is my snippet call:
[[!getResources? &parents=`16` &limit=`1` &tpl=`myTpl` &includeContent=`1`]]
Here is the template:
[[+content]]
Error log is attached.
-
☆ A M B ☆
- 237 Posts
Ok... I guess I’m the only one who’s having this problem...
With that being said I installed Modx Revo on a completely different server. Switched over to a pc and installed getResources from Firefox. I just got to thinking maybe it was a mac safari thing. Doesn’t look that way.
So, same problem. Here’s the error:
[2010-09-14 13:49:48] (ERROR @ /index.php) Error 42000 executing statement: Array ( [0] => 42000 [1] => 1064 [2] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’1,2,4,3) AND (`modResource`.`context_key` IN (’web’) OR EXISTS(SELECT 1 FROM `mo’ at line 1 )
I used the same calls as above.
Here are the server specs. Anyone have any idea? I’m getting ready to trash the whole thing and switch back to Evo.
PHP5 5.2.14 (default)
PERL 5.10.0 /usr/bin/perl
Ruby 1.8.7 /usr/local/bin/ruby
Python 2.5.2 /usr/local/bin/python
MySQL 5 5.0.90
Zend Optimizer 3.3.9 -
-
☆ A M B ☆
- 237 Posts
Is this really just a problem that I’m having? No one else is getting errors at all? Very strange. I installed it on two completely different servers with different providers and get the same problems.
Anyone?
I remember seeing this yesterday. I can replicate that error using getResources if I don’t specify a &parents=`xx` parameter. I had (wrongly) assumed that giving a &resources parameter was enough.
[tt][2010-09-15 17:26:58] (ERROR @ /index.php) Error 42000 executing statement: Array ( [0] => 42000 [1] => 1064 [2] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’1,11,12,13,14,15,2,16,26,18,19,20,21,22,23,24,25,3,4,7,9,5,8,6,28,29,27) AND (`m’ at line 1 ) [/tt]
Although my error is bigger. Hurrah. And fixable by doing it properly.
Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
-
☆ A M B ☆
- 237 Posts
Hmmm... I am using an &parents=`xx` on all of my calls and it still doesn’t work. So, not sure what to try next.
Are you positive you’ve got the latest version of getResources? (Under package management you can right click on getResources and specify ’Check for updates’). There’s something about this error in your log that’s reminding me of a thread I saw on here recently, but I can’t now find - [2010-09-13 16:23:16] (ERROR @ /home/elucidat/public_html/core/xpdo/xpdo.class.php : 1668) PHP warning: json_encode() [<a href=’function.json-encode’>function.json-encode</a>]: recursion detected.
I _think_ the answer was to update the getResources package, but that could be wishful thinking.
I’ve just copied and pasted your code and template and it never throws an error (except, as I said, if I leave out &parents, but then it seems to be a different error anyway) or at worse, blank if the parent I select has hidden children, or a raw array if I mess up the tpl (or miss it out). I’m using getResources 1.1.0 pl
Sorry not to be of more help.
Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86