solved cri mysql error in shops...only when logged out

soaringeagle
@soaringeagle
8 years ago
3,304 posts
CRI: Query Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY RAND() LIMIT 1000000' at line 3

on page
http://www.dreadlockssite.com/shops
but
https://www.dreadlockssite.com/shops
works fine..at least when actually logged in

hmm was
{debug}
discontinued? tryingto find another order_by option but debug just puts debug on the page as text




--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

updated by @soaringeagle: 01/17/17 05:18:15AM
brian
@brian
8 years ago
10,148 posts
debug is still supported - not seeing any issues here. What version of the Core are you running?

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
soaringeagle
@soaringeagle
8 years ago
3,304 posts
everythings updated but sitebuilder and ningja
i have not been able to get my site right on that to my satisfaction ..had a number of issues
and the way the rotator worked b4 is really needed
i need to rotate all featured shops, featured and random photos etc


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
michael
@michael
8 years ago
7,721 posts
Use the "Template Code" widget, it will allow you to use any code you could have used in a template.
alt=
Reese
@reese
8 years ago
4 posts
you mean to use debug? but can you see any reason why only logged in users (and i think only logged in as admin) get the page to load, everyone else gets this error?
alt=
Reese
@reese
8 years ago
4 posts
oh crap not logged in as me on this browser sorry again reese
soaringeagle
@soaringeagle
8 years ago
3,304 posts
sorry i'm me again that shouldnt happen again


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
michael
@michael
8 years ago
7,721 posts
I mean, you had code that worked. Put that code into a template widget.
soaringeagle
@soaringeagle
8 years ago
3,304 posts
no diference
same msql error


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
michael
@michael
8 years ago
7,721 posts
The query should show up in the activity log under the ?. paste it here.

If you're saying that it only happens when {debug} is placed in your code, try placing debug somewhere else.
brian
@brian
8 years ago
10,148 posts
What version of the core are you running?


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
soaringeagle
@soaringeagle
8 years ago
3,304 posts
latest core.. everything except sitebuilder and ningja is always updated immediately
and no it has nothing to do with debug i just couldnt get debug to work
though i didnt put it directly int the template
it only affects it when not logged in as admin
will look into log and reply


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
soaringeagle
@soaringeagle
8 years ago
3,304 posts
debug entry 	
Key 	Value
Message 	Query Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY RAND() LIMIT 1000000' at line 3
Date 	10/16/16 02:23:05PM
IP Address 	54.175.227.92
URL 	/shops
Memory 	21.5MB
Data 	
Array
(
    [error] => Query Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY RAND() LIMIT 1000000' at line 3
    [_post] => Array
        (
            [_uri] => /shops
            [module_url] => shops
            [module] => 
        )

    [query] => SELECT a.`_item_id` AS _item_id FROM jr_jrfoxycartbundle_item_key a
JOIN jr_jrfoxycartbundle_item_key pr ON (pr.`_item_id` = a.`_item_id` AND pr.`key` = '_profile_id' AND pr.`value` NOT IN(1081, 1414, 2312, 2336, 2419, 2699, 2803, 3091, 3959, 5172, 5225, 6523, 6743, 7802, 7845, 8238, 8343, 8664, 8820, 9233, 9667, 9751, 9865, 10202, 10860, 10922, 11183, 11529, 11848, 12128, 12488, 13167, 13483, 13589, 13779, 13858, 13861, 13879, 13885, 13930, 13942, 13973, 13979, 13980, 14027, 14094, 14114, 14146, 14152, 14161, 14202, 14240, 14251, 14275, 14372, 14377, 14392, 14524, 14579, 212, 354, 12446, 14384, 14414, 14609, 14618, 14621, 14630, 14635, 14640))
WHERE ORDER BY RAND() LIMIT 1000000 
)



--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
soaringeagle
@soaringeagle
8 years ago
3,304 posts
i think i understand the issue maybe
order_by="product_qty random"

is product_qty not common to jrStore and jrFoxyCartBundle?
or is the randomizing of that causing issues


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
soaringeagle
@soaringeagle
8 years ago
3,304 posts
and since im not getting debug to work what other keys can be used to randomize thatlist


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
michael
@michael
8 years ago
7,721 posts
The issue looks to me like the WHERE part
WHERE ORDER B........
There is no WHERE parameter. Same query with WHERE 1 would even work.

WHERE 1 ORDER B........

Whats the template code that generates that query?
soaringeagle
@soaringeagle
8 years ago
3,304 posts
{jrSeamless_list modules="jrFoxyCartBundle,jrStore" limit="8" order_by="product_qty random" }



--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
paul
@paul
8 years ago
4,326 posts
You'll need to order_by a key that's common to both items and use a wildcard - order_by="*_qty random"
Unfortunately by default the Bundle module doesn't use the 'bundle_qty' key.


--
Paul Asher - JR Developer and System Import Specialist
brian
@brian
8 years ago
10,148 posts
Since you won't answer me by telling me what VERSION of the core you are running, I am going to assume you are running 5.4.0b4, which has a bug in it in regards to this.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
soaringeagle
@soaringeagle
8 years ago
3,304 posts
oh your right sorry ...when i say updated to newest that includes beta
version: 5.4.0b4
ok good to know
hope a fix is scheduled soonish?


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
brian
@brian
8 years ago
10,148 posts
If this is related to what I think it is, it's already fixed in JR6:

https://www.jamroom.net/the-jamroom-network/forum/announcements/44027/jamroom-6-beta-kick-off


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

updated by @brian: 10/17/16 02:16:23PM
soaringeagle
@soaringeagle
8 years ago
3,304 posts
woot
but will old jr 5 skins work on jr 6 will they need to be adapted

please tell me that a search, and shops updates are coming too soon
because im stuck on old sitebuilder thats not going to screw me or is the jr 6 sb going to function the way i hope


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

Tags