Advertisement
androlizer

Untitled

Nov 14th, 2017
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 13.08 KB | None | 0 0
  1. {"name":"Database Exception","message":"SQLSTATE[HY093]: Invalid parameter number: parameter was not defined\nThe SQL being executed was: select row_to_json(result) \"data\" from (select \"now\", ''||(json(posts->>json_array_length(posts)-1)->>'post_id')::bigint-1 \"next\" , posts from (select floor(extract(epoch from now())) \"now\", array_to_json (array_agg(post)) posts from (select row_to_json (post) post from (select post.id \"post_id\" , post.user_id, post.sku ,post.created_at \"created_at\" ,post.updated_at \"updated_at\",(select row_to_json(counts) counts from (select post.count_like \"like\" , post.count_comment \"comment\" , post.count_wish \"wish\" , post.count_order \"shop\" ,(select count(case when post_like.user_id = 1908 then 1 end) \"liked\" from post_like where post_like.post_id = post.id) \"liked\" ) counts),(select row_to_json(\"user\") \"user\" from (select u.\"username\", \"u\".id \"user_id\" , url , (select replace(replace(replace(\"thumbnail\",':\/\/xshopper-002.xshopper.com\/',':\/\/i.xshopper.com\/'),':\/\/s3-ap-southeast-2.amazonaws.com\/xshopper-002\/',':\/\/i.xshopper.com\/'),'http:\/\/','https:\/\/') \"profile_picture\" from \"imagec_user\" WHERE \"imagec_user\".\"id\" = \"u\".id) \"profile_picture\", (case when 1908 != \"u\".id then coalesce((select true from \"user_follow\" where \"u\".id = user_follow.user_id_following and user_follow.user_id = 1908)::boolean,false)end) followed from \"user\" u where \"u\".id = post.user_id) \"user\") \"user\" ,(select array_to_json (array_agg(com)) \"comments\" from (select row_to_json(com) \"comment\" from ( select id , comment_out(\"comment\") \"text\" ,created_at \"created_at\" , case post_comment_status when 0 then 'comment' when 10 then 'fabric' when 11 then 'description' when 20 then 'title' when 21 then 'other' when 1 then 'first' when -1 then 'deleted' end \"type\" ,(select row_to_json(\"user\") \"user\" from (select u.\"username\", \"u\".id \"user_id\" , url , (select replace(replace(replace(\"thumbnail\",':\/\/xshopper-002.xshopper.com\/',':\/\/i.xshopper.com\/'),':\/\/s3-ap-southeast-2.amazonaws.com\/xshopper-002\/',':\/\/i.xshopper.com\/'),'http:\/\/','https:\/\/') \"profile_picture\" from \"imagec_user\" WHERE \"imagec_user\".\"id\" = \"u\".id) \"profile_picture\", (case when 1908 != \"u\".id then coalesce((select true from \"user_follow\" where \"u\".id = user_follow.user_id_following and user_follow.user_id = 1908)::boolean,false)end) followed from \"user\" u where \"u\".id = post_comment.user_id) \"user\") \"user\" from post_comment where post_comment.post_id = post.id and post_comment_status between 0 and 19 ORDER BY post_comment.post_comment_status , post_comment.id DESC LIMIT 3 ) com ) com ) \"comments\",coalesce((select array_to_json (array_agg(image)) images from (select row_to_json(image) image from (select \"type\", \"id\" image_id ,case when attribs::char(2) = '[]' then null else attribs end attribs , json('{\"url\":\"' || replace(replace(replace(original,':\/\/xshopper-002.xshopper.com\/',':\/\/i.xshopper.com\/'),':\/\/s3-ap-southeast-2.amazonaws.com\/xshopper-002\/',':\/\/i.xshopper.com\/'),'http:\/\/','https:\/\/') || '\",\"size\":'||coalesce(\"original_size\",'null')||'}') \"original\" , json('{\"url\":\"' || replace(replace(replace(low_resolution,':\/\/xshopper-002.xshopper.com\/',':\/\/i.xshopper.com\/'),':\/\/s3-ap-southeast-2.amazonaws.com\/xshopper-002\/',':\/\/i.xshopper.com\/'),'http:\/\/','https:\/\/') || '\",\"size\":'||coalesce(\"low_resolution_size\",'null')||'}') \"low_resolution\" , json('{\"url\":\"' || replace(replace(replace(thumbnail,':\/\/xshopper-002.xshopper.com\/',':\/\/i.xshopper.com\/'),':\/\/s3-ap-southeast-2.amazonaws.com\/xshopper-002\/',':\/\/i.xshopper.com\/'),'http:\/\/','https:\/\/') || '\",\"size\":'||coalesce(\"thumbnail_size\",'null')||'}') \"thumbnail\" , json('{\"url\":\"' || replace(replace(replace(standard_resolution,':\/\/xshopper-002.xshopper.com\/',':\/\/i.xshopper.com\/'),':\/\/s3-ap-southeast-2.amazonaws.com\/xshopper-002\/',':\/\/i.xshopper.com\/'),'http:\/\/','https:\/\/') || '\",\"size\":'||coalesce(\"standard_resolution_size\",'null')||'}') \"standard_resolution\" from imagec where imagec.post_id = post.id and imagec_status = 0 order by position) image ) image ),json('[{\"type\": \"image\", \"image_id\": 0 , \"original\": {\"url\" : \"http:\/\/s3-ap-southeast-2.amazonaws.com\/xshopper-002\/847_profile_531295517.png\", \"size\" : { \"height\" : 120, \"width\" : 120 }, \"low_resolution\": null, \"thumbnail\": null, \"standard_resolution\": null}}]')) images ,(select array_to_json (array_agg(items)) items from (select row_to_json(item) item FROM (select post_link.id \"link_id\" , post_link.post_id_linked \"post_id\", post_item.sku, post_item.plink,'https:\/\/www.xshopper.com\/collection\/'||( coalesce((select collection from post_collection pc where post.user_id=1908 and pc.post_id = post.id order by pc.created_at desc limit 1) , 'c_'||1908||'_'||post_item.id)) url,'https:\/\/www.xshopper.com\/collection\/'||( coalesce((select collection from post_collection pc where post.user_id=1908 and pc.post_id = post.id order by pc.created_at desc limit 1) , 'c_'||1908||'_'||post_item.id)) url, (select row_to_json(price) price from (select round(cast((case when post_link.pricing_type = '%' THEN (1+post_link.pricing_attribute::float\/100) ELSE NULL END * price* currency_xch(post_price.currency,'CAD'::char(3)) )* ((1+case when store.discount<=20 then (20-store.discount)\/100::float else 0 end)) as numeric),2)show_price, 'CAD'::char(3) show_currency , '' subtitle, case when attribs::char(2) = '[]' then null else attribs end attribs, \"flags\" from post_price , \"user\" store where store.id = post_price.user_id_store and post_price.post_id = post_item.id and post_price.type = 0) \"price\" ) \"price\",(select array_to_json (array_agg(com)) \"comments\" from (select row_to_json(com) \"comment\" from ( select id , comment_out(\"comment\") \"text\" ,created_at \"created_at\" , case post_comment_status when 0 then 'comment' when 10 then 'fabric' when 11 then 'description' when 20 then 'title' when 21 then 'other' when 1 then 'first' when -1 then 'deleted' end \"type\" ,(select row_to_json(\"user\") \"user\" from (select u.\"username\", \"u\".id \"user_id\" , url , (select replace(replace(replace(\"thumbnail\",':\/\/xshopper-002.xshopper.com\/',':\/\/i.xshopper.com\/'),':\/\/s3-ap-southeast-2.amazonaws.com\/xshopper-002\/',':\/\/i.xshopper.com\/'),'http:\/\/','https:\/\/') \"profile_picture\" from \"imagec_user\" WHERE \"imagec_user\".\"id\" = \"u\".id) \"profile_picture\", (case when 1908 != \"u\".id then coalesce((select true from \"user_follow\" where \"u\".id = user_follow.user_id_following and user_follow.user_id = 1908)::boolean,false)end) followed from \"user\" u where \"u\".id = post_comment.user_id) \"user\") \"user\" from post_comment where post_comment.post_id = post_item.id and post_comment_status between 0 and 19 ORDER BY post_comment.post_comment_status , post_comment.id DESC LIMIT 3 ) com ) com ) \"comments\",(select row_to_json(counts) counts from (select post_item.count_like \"like\" , post_item.count_comment \"comment\" , post_item.count_wish \"wish\" , post_item.count_order \"shop\" ,(select count(case when post_like.user_id = 1908 then 1 end) \"liked\" from post_like where post_like.post_id = post_item.id) \"liked\" ) counts),coalesce((select array_to_json (array_agg(image)) images from (select row_to_json(image) image from (select \"type\", \"id\" image_id ,case when attribs::char(2) = '[]' then null else attribs end attribs , json('{\"url\":\"' || replace(replace(replace(original,':\/\/xshopper-002.xshopper.com\/',':\/\/i.xshopper.com\/'),':\/\/s3-ap-southeast-2.amazonaws.com\/xshopper-002\/',':\/\/i.xshopper.com\/'),'http:\/\/','https:\/\/') || '\",\"size\":'||coalesce(\"original_size\",'null')||'}') \"original\" , json('{\"url\":\"' || replace(replace(replace(low_resolution,':\/\/xshopper-002.xshopper.com\/',':\/\/i.xshopper.com\/'),':\/\/s3-ap-southeast-2.amazonaws.com\/xshopper-002\/',':\/\/i.xshopper.com\/'),'http:\/\/','https:\/\/') || '\",\"size\":'||coalesce(\"low_resolution_size\",'null')||'}') \"low_resolution\" , json('{\"url\":\"' || replace(replace(replace(thumbnail,':\/\/xshopper-002.xshopper.com\/',':\/\/i.xshopper.com\/'),':\/\/s3-ap-southeast-2.amazonaws.com\/xshopper-002\/',':\/\/i.xshopper.com\/'),'http:\/\/','https:\/\/') || '\",\"size\":'||coalesce(\"thumbnail_size\",'null')||'}') \"thumbnail\" , json('{\"url\":\"' || replace(replace(replace(standard_resolution,':\/\/xshopper-002.xshopper.com\/',':\/\/i.xshopper.com\/'),':\/\/s3-ap-southeast-2.amazonaws.com\/xshopper-002\/',':\/\/i.xshopper.com\/'),'http:\/\/','https:\/\/') || '\",\"size\":'||coalesce(\"standard_resolution_size\",'null')||'}') \"standard_resolution\" from imagec where imagec.post_id = post_item.id and imagec_status = 0 order by position) image ) image ),json('[{\"type\": \"image\", \"image_id\": 0 , \"original\": {\"url\" : \"http:\/\/s3-ap-southeast-2.amazonaws.com\/xshopper-002\/847_profile_531295517.png\", \"size\" : { \"height\" : 120, \"width\" : 120 }, \"low_resolution\": null, \"thumbnail\": null, \"standard_resolution\": null}}]')) images ,(select row_to_json(\"user\") \"user\" from(select u.\"username\" , replace(replace(replace(\"thumbnail\",':\/\/xshopper-002.xshopper.com\/',':\/\/i.xshopper.com\/'),':\/\/s3-ap-southeast-2.amazonaws.com\/xshopper-002\/',':\/\/i.xshopper.com\/'),'http:\/\/','https:\/\/') \"profile_picture\" ,u.currency,'http:\/\/'||url_domain url from \"user\" u LEFT OUTER JOIN \"imagec_user\" ON (\"imagec_user\".\"id\" = \"u\".id) where \"u\".id = user_shop.id) \"user\") \"user\" from post_link , \"user\" user_shop, \"post\" post_item where post_link.post_id = post.id and post_link.post_id_linked = post_item.id and post_item.user_id = user_shop.id and post_link.position != -1 ) item ) items) from post where \"post\".user_id = 1908 and post.id = :post_id and post.status = 0) post ORDER BY post.post_id DESC LIMIT 1 ) posts ) result) result","code":0,"type":"yii\\db\\Exception","file":"\/var\/app\/current\/vendor\/yiisoft\/yii2\/db\/Schema.php","line":636,"stack-trace":["#0 \/var\/app\/current\/vendor\/yiisoft\/yii2\/db\/Command.php(917): yii\\db\\Schema->convertException(Object(PDOException), 'select row_to_j...')","#1 \/var\/app\/current\/vendor\/yiisoft\/yii2\/db\/Command.php(362): yii\\db\\Command->queryInternal('fetchAll', NULL)","#2 \/var\/app\/current\/common\/models\/Lists.php(2106): yii\\db\\Command->queryAll()","#3 \/var\/app\/current\/rest\/versions\/v1\/controllers\/PostController.php(241): common\\models\\Lists->getUserFeed(Object(common\\models\\User), Object(common\\models\\User), NULL, 1, '', true, 0)","#4 [internal function]: rest\\versions\\v1\\controllers\\PostController->actionPost('')","#5 \/var\/app\/current\/vendor\/yiisoft\/yii2\/base\/InlineAction.php(57): call_user_func_array(Array, Array)","#6 \/var\/app\/current\/vendor\/yiisoft\/yii2\/base\/Controller.php(156): yii\\base\\InlineAction->runWithParams(Array)","#7 \/var\/app\/current\/vendor\/yiisoft\/yii2\/base\/Module.php(523): yii\\base\\Controller->runAction('post', Array)","#8 \/var\/app\/current\/vendor\/yiisoft\/yii2\/web\/Application.php(102): yii\\base\\Module->runAction('v1\/post\/post', Array)","#9 \/var\/app\/current\/rest\/web\/index.php(35): yii\\web\\Application->handleRequest(Object(yii\\web\\Request))","#10 \/var\/app\/current\/vendor\/yiisoft\/yii2\/base\/Application.php(380): MyApplication->handleRequest(Object(yii\\web\\Request))","#11 \/var\/app\/current\/rest\/web\/index.php(41): yii\\base\\Application->run()","#12 {main}"],"error-info":["HY093",0],"previous":{"name":"Exception","message":"SQLSTATE[HY093]: Invalid parameter number: parameter was not defined","code":"HY093","type":"PDOException","file":"\/var\/app\/current\/vendor\/yiisoft\/yii2\/db\/Command.php","line":902,"stack-trace":["#0 \/var\/app\/current\/vendor\/yiisoft\/yii2\/db\/Command.php(902): PDOStatement->execute()","#1 \/var\/app\/current\/vendor\/yiisoft\/yii2\/db\/Command.php(362): yii\\db\\Command->queryInternal('fetchAll', NULL)","#2 \/var\/app\/current\/common\/models\/Lists.php(2106): yii\\db\\Command->queryAll()","#3 \/var\/app\/current\/rest\/versions\/v1\/controllers\/PostController.php(241): common\\models\\Lists->getUserFeed(Object(common\\models\\User), Object(common\\models\\User), NULL, 1, '', true, 0)","#4 [internal function]: rest\\versions\\v1\\controllers\\PostController->actionPost('')","#5 \/var\/app\/current\/vendor\/yiisoft\/yii2\/base\/InlineAction.php(57): call_user_func_array(Array, Array)","#6 \/var\/app\/current\/vendor\/yiisoft\/yii2\/base\/Controller.php(156): yii\\base\\InlineAction->runWithParams(Array)","#7 \/var\/app\/current\/vendor\/yiisoft\/yii2\/base\/Module.php(523): yii\\base\\Controller->runAction('post', Array)","#8 \/var\/app\/current\/vendor\/yiisoft\/yii2\/web\/Application.php(102): yii\\base\\Module->runAction('v1\/post\/post', Array)","#9 \/var\/app\/current\/rest\/web\/index.php(35): yii\\web\\Application->handleRequest(Object(yii\\web\\Request))","#10 \/var\/app\/current\/vendor\/yiisoft\/yii2\/base\/Application.php(380): MyApplication->handleRequest(Object(yii\\web\\Request))","#11 \/var\/app\/current\/rest\/web\/index.php(41): yii\\base\\Application->run()","#12 {main}"]}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement