ajaxSearchが動作しない
ajaxSearchが動作しない
もう一点、AjaxSearchも動かないようです。
ajaxモード・non-ajaxモード共に下記のようなエラーになります。
よろしくお願いいたします。
« MODX Parse Error »
MODX encountered the following error while attempting to parse the requested resource:
« Execution of a query to the database failed - Expression #11 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'ntv1.value' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by »
Backtrace
1 $modx->executeParser()
index.php on line 124
2 $modx->prepareResponse()
manager/includes/document.parser.class.inc.php on line 271
3 $modx->outputContent()
manager/includes/document.parser.class.inc.php on line 534
4 $modx->parseNonCachedSnippets()
manager/includes/document.parser.class.inc.php on line 615
5 $modx->parseDocumentSource()
manager/includes/document.parser.class.inc.php on line 740
6 $modx->invokeEvent()
manager/includes/document.parser.class.inc.php on line 2794
7 $modx->evalPlugin()
manager/includes/document.parser.class.inc.php on line 3930
8 eval()
manager/includes/document.parser.class.inc.php on line 2170
9 PHxParser->OnParseDocument()
manager/includes/document.parser.class.inc.php(2170) : eval()'d code on line 24
10 PHxParser->Parse()
assets/plugins/phx/phx.parser.class.inc.php on line 47
11 PHxParser->ParseValues()
assets/plugins/phx/phx.parser.class.inc.php on line 65
12 $modx->evalSnippets()
assets/plugins/phx/phx.parser.class.inc.php on line 140
13 $modx->_get_snip_result()
manager/includes/document.parser.class.inc.php on line 2315
14 $modx->evalSnippet()
manager/includes/document.parser.class.inc.php on line 2377
15 eval()
manager/includes/document.parser.class.inc.php on line 2238
16 require()
manager/includes/document.parser.class.inc.php(2238) : eval()'d code on line 17
17 AjaxSearch->run()
assets/snippets/ajaxSearch/snippet.ajaxSearch.php on line 409
18 AjaxSearchCtrl->run()
assets/snippets/ajaxSearch/classes/ajaxSearch.class.inc.php on line 101
19 AjaxSearchResults->getSearchResults()
assets/snippets/ajaxSearch/classes/ajaxSearchCtrl.class.inc.php on line 70
20 AjaxSearchRequest->doSearch()
assets/snippets/ajaxSearch/classes/ajaxSearchResults.class.inc.php on line 99
21 DBAPI->query()
assets/snippets/ajaxSearch/classes/ajaxSearchRequest.class.inc.php on line 65
22 $modx->__call()
manager/includes/extenders/dbapi/mysqli.inc.php on line 188
ajaxモード・non-ajaxモード共に下記のようなエラーになります。
よろしくお願いいたします。
« MODX Parse Error »
MODX encountered the following error while attempting to parse the requested resource:
« Execution of a query to the database failed - Expression #11 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'ntv1.value' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by »
Backtrace
1 $modx->executeParser()
index.php on line 124
2 $modx->prepareResponse()
manager/includes/document.parser.class.inc.php on line 271
3 $modx->outputContent()
manager/includes/document.parser.class.inc.php on line 534
4 $modx->parseNonCachedSnippets()
manager/includes/document.parser.class.inc.php on line 615
5 $modx->parseDocumentSource()
manager/includes/document.parser.class.inc.php on line 740
6 $modx->invokeEvent()
manager/includes/document.parser.class.inc.php on line 2794
7 $modx->evalPlugin()
manager/includes/document.parser.class.inc.php on line 3930
8 eval()
manager/includes/document.parser.class.inc.php on line 2170
9 PHxParser->OnParseDocument()
manager/includes/document.parser.class.inc.php(2170) : eval()'d code on line 24
10 PHxParser->Parse()
assets/plugins/phx/phx.parser.class.inc.php on line 47
11 PHxParser->ParseValues()
assets/plugins/phx/phx.parser.class.inc.php on line 65
12 $modx->evalSnippets()
assets/plugins/phx/phx.parser.class.inc.php on line 140
13 $modx->_get_snip_result()
manager/includes/document.parser.class.inc.php on line 2315
14 $modx->evalSnippet()
manager/includes/document.parser.class.inc.php on line 2377
15 eval()
manager/includes/document.parser.class.inc.php on line 2238
16 require()
manager/includes/document.parser.class.inc.php(2238) : eval()'d code on line 17
17 AjaxSearch->run()
assets/snippets/ajaxSearch/snippet.ajaxSearch.php on line 409
18 AjaxSearchCtrl->run()
assets/snippets/ajaxSearch/classes/ajaxSearch.class.inc.php on line 101
19 AjaxSearchResults->getSearchResults()
assets/snippets/ajaxSearch/classes/ajaxSearchCtrl.class.inc.php on line 70
20 AjaxSearchRequest->doSearch()
assets/snippets/ajaxSearch/classes/ajaxSearchResults.class.inc.php on line 99
21 DBAPI->query()
assets/snippets/ajaxSearch/classes/ajaxSearchRequest.class.inc.php on line 65
22 $modx->__call()
manager/includes/extenders/dbapi/mysqli.inc.php on line 188
1.0.22Jベータです
上書きして、表示された文字列を教えていただいてよいでしょうか?
1.0.22Jベータです
APIが関係してそうな部分がなかったので調べてみたところ、
https://qiita.com/bboobbaa/items/9fdca834076cb4c3389e
これが関係しているような気もします。1.0.22Jにアップデートする前は動作してましたでしょうか?
https://qiita.com/bboobbaa/items/9fdca834076cb4c3389e
これが関係しているような気もします。1.0.22Jにアップデートする前は動作してましたでしょうか?
1.0.22Jベータです
ありがとうございます。
下記が表示されました。
SELECT sc.id, sc.pagetitle, sc.longtitle, sc.description, sc.alias, sc.introtext, sc.template, sc.menutitle, sc.content, sc.publishedon, ntv1.value AS `M_en`, ntv2.value AS `M_kana` FROM `modx_site_content` sc LEFT JOIN( SELECT DISTINCT tv1.contentid , tv1.value FROM `modx_site_tmplvar_contentvalues` tv1 WHERE tv1.tmplvarid = '2' ) AS ntv1 ON sc.id = ntv1.contentid LEFT JOIN( SELECT DISTINCT tv2.contentid , tv2.value FROM `modx_site_tmplvar_contentvalues` tv2 WHERE tv2.tmplvarid = '3' ) AS ntv2 ON sc.id = ntv2.contentid WHERE ((sc.id IN (36,37,417,93,94,3921,3922,3208,880,416,90,389,1861,2506,3046,3863,3940,74,4188,1772,4433,4516,4517,3050,4338,2735,3696,180,4270,1655,4486,2708,4514,3943,3913,4374,2821,3094,4177,4589,4425,4269,3011,4344,4584,4184,2736,3860,4522,147,3741,4062,169,3020,788,4426,4138,4418,150,4574,2785,4582,3726,4515,4587,3736,4176,2125,4371,3113,2657,2053,4274,3858,2833,329,4339,673,4265,1998,3637,3639,4130,2923,2867,2585,174,4250,125,310,2753,153,4592,3126,4649,4652,251,252,388,798,800,801,1862,2503,2504,843,1447,3734,3813,3720,3660,3590,3110,3310,2606,2643,1524,212,2693,2634,2586,2559,1939,214,197,792,195,196,189,662,287,4061,659,268,4060,1474,158,1491,184,213,115,194,208,1638,901,138,156,152,3688,285,1408,177,1982,188,1190,997,1995,1918,2092,117,993,2061,2998,1902,200,909,4266,1637,4370,2046,4249,2517,3516,132,1813,4136,955,3941,4053,157,2120,1201,3910,4252,902,1209,3882,1932,898,991,2526,2565,3588,832,3843,2497,4178,1690,2068,3485,393,3727,4372,2131,1590,4137,1695,850,2527,2129,2091,4264,2052,3365,3691,2651,4423,2551,2545,4342,2762,3422,1956,3661,4179,2683,144,1387,1689,2496,2659,1761,2723,2128,784,4129,1197,2067,3733,2143,3300,155,217,1817,1677,205,4435,1600,4438,143,2085,661,2553,1676,2578,1919,1916,899,2912,2564,2828,2499,1630,2123,2909,2849,2925,2642,3023,2919,2924,2780,3012,3264,2093,3225,2926,151,1878,3112,918,874,391,137,3099,3100,3204,159,1573,3261,199,1917,182,1962,2764,3668,624,3095,3203,2687,3723,3517,3587,3589,3716,3585,3658,3725,1891,1537,246,658,3007,298,1477,711,1972,3198,139,1501,2776,3260,2916,3006,3258,3671,3182,3634,3665,3689,3105,3309,3446,3730,3656,3731,3450,3603,3732,3232,135,3852,3857,3942,1688,3512,3912,3215,2671,3939,3842,2837,4059,3856,2835,4186,4175,2913,4185,192,3581)) AND (sc.published=1) AND (sc.searchable=1) AND (sc.deleted=0) AND (sc.privateweb=0)) GROUP BY sc.id HAVING (((sc.pagetitle LIKE '%あああ%') OR (sc.alias LIKE '%あああ%') OR (`M_en` LIKE '%あああ%') OR (`M_kana` LIKE '%あああ%'))) ORDER BY `publishedon`,`pagetitle`
あと1.0.22J-b1(MAMP PHP7.2.14)は、
ajaxSearchは未確認のままrc5に上書きしてしまったので、
今、稼働している1.0.20J(さくらインターネット PHP5.6)を、
PHP7.2にして動かしてみたところ、
こういうエラーが出ました。
よろしくお願いいたします。
イベントID 497
ソース Parser - session_name($site_sessionname);
日付 2019/05/09 20:20:04
« MODX Parse Error »
MODX encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error : session_name(): Cannot change session name when session is active
ErrorType[num] : WARNING[2]
File : /home/xxx/www/xxxx/manager/includes/initialize.functions.inc
Line : 9
Source : session_name($site_sessionname);
LastQuery : SELECT id, parent FROM `xxx`.`modx_site_content` WHERE deleted=0 ORDER BY parent, menuindex
Basic info
REQUEST_URI : /index-ajax.php
User Agent : Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Safari/605.1.15
Benchmarks
MySQL : 0.0023 s (2 Requests)
PHP : 0.0077 s
Total : 0.0100 s
Memory : 1.84 MB
Backtrace
1 include_once()
index-ajax.php on line 29
2 startCMSSession()
assets/snippets/ajaxSearch/ajaxSearchPopup.php on line 39
3 session_name()
manager/includes/initialize.functions.inc on line 9
下記が表示されました。
SELECT sc.id, sc.pagetitle, sc.longtitle, sc.description, sc.alias, sc.introtext, sc.template, sc.menutitle, sc.content, sc.publishedon, ntv1.value AS `M_en`, ntv2.value AS `M_kana` FROM `modx_site_content` sc LEFT JOIN( SELECT DISTINCT tv1.contentid , tv1.value FROM `modx_site_tmplvar_contentvalues` tv1 WHERE tv1.tmplvarid = '2' ) AS ntv1 ON sc.id = ntv1.contentid LEFT JOIN( SELECT DISTINCT tv2.contentid , tv2.value FROM `modx_site_tmplvar_contentvalues` tv2 WHERE tv2.tmplvarid = '3' ) AS ntv2 ON sc.id = ntv2.contentid WHERE ((sc.id IN (36,37,417,93,94,3921,3922,3208,880,416,90,389,1861,2506,3046,3863,3940,74,4188,1772,4433,4516,4517,3050,4338,2735,3696,180,4270,1655,4486,2708,4514,3943,3913,4374,2821,3094,4177,4589,4425,4269,3011,4344,4584,4184,2736,3860,4522,147,3741,4062,169,3020,788,4426,4138,4418,150,4574,2785,4582,3726,4515,4587,3736,4176,2125,4371,3113,2657,2053,4274,3858,2833,329,4339,673,4265,1998,3637,3639,4130,2923,2867,2585,174,4250,125,310,2753,153,4592,3126,4649,4652,251,252,388,798,800,801,1862,2503,2504,843,1447,3734,3813,3720,3660,3590,3110,3310,2606,2643,1524,212,2693,2634,2586,2559,1939,214,197,792,195,196,189,662,287,4061,659,268,4060,1474,158,1491,184,213,115,194,208,1638,901,138,156,152,3688,285,1408,177,1982,188,1190,997,1995,1918,2092,117,993,2061,2998,1902,200,909,4266,1637,4370,2046,4249,2517,3516,132,1813,4136,955,3941,4053,157,2120,1201,3910,4252,902,1209,3882,1932,898,991,2526,2565,3588,832,3843,2497,4178,1690,2068,3485,393,3727,4372,2131,1590,4137,1695,850,2527,2129,2091,4264,2052,3365,3691,2651,4423,2551,2545,4342,2762,3422,1956,3661,4179,2683,144,1387,1689,2496,2659,1761,2723,2128,784,4129,1197,2067,3733,2143,3300,155,217,1817,1677,205,4435,1600,4438,143,2085,661,2553,1676,2578,1919,1916,899,2912,2564,2828,2499,1630,2123,2909,2849,2925,2642,3023,2919,2924,2780,3012,3264,2093,3225,2926,151,1878,3112,918,874,391,137,3099,3100,3204,159,1573,3261,199,1917,182,1962,2764,3668,624,3095,3203,2687,3723,3517,3587,3589,3716,3585,3658,3725,1891,1537,246,658,3007,298,1477,711,1972,3198,139,1501,2776,3260,2916,3006,3258,3671,3182,3634,3665,3689,3105,3309,3446,3730,3656,3731,3450,3603,3732,3232,135,3852,3857,3942,1688,3512,3912,3215,2671,3939,3842,2837,4059,3856,2835,4186,4175,2913,4185,192,3581)) AND (sc.published=1) AND (sc.searchable=1) AND (sc.deleted=0) AND (sc.privateweb=0)) GROUP BY sc.id HAVING (((sc.pagetitle LIKE '%あああ%') OR (sc.alias LIKE '%あああ%') OR (`M_en` LIKE '%あああ%') OR (`M_kana` LIKE '%あああ%'))) ORDER BY `publishedon`,`pagetitle`
あと1.0.22J-b1(MAMP PHP7.2.14)は、
ajaxSearchは未確認のままrc5に上書きしてしまったので、
今、稼働している1.0.20J(さくらインターネット PHP5.6)を、
PHP7.2にして動かしてみたところ、
こういうエラーが出ました。
よろしくお願いいたします。
イベントID 497
ソース Parser - session_name($site_sessionname);
日付 2019/05/09 20:20:04
« MODX Parse Error »
MODX encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error : session_name(): Cannot change session name when session is active
ErrorType[num] : WARNING[2]
File : /home/xxx/www/xxxx/manager/includes/initialize.functions.inc
Line : 9
Source : session_name($site_sessionname);
LastQuery : SELECT id, parent FROM `xxx`.`modx_site_content` WHERE deleted=0 ORDER BY parent, menuindex
Basic info
REQUEST_URI : /index-ajax.php
User Agent : Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Safari/605.1.15
Benchmarks
MySQL : 0.0023 s (2 Requests)
PHP : 0.0077 s
Total : 0.0100 s
Memory : 1.84 MB
Backtrace
1 include_once()
index-ajax.php on line 29
2 startCMSSession()
assets/snippets/ajaxSearch/ajaxSearchPopup.php on line 39
3 session_name()
manager/includes/initialize.functions.inc on line 9
1.0.22Jベータです
ajaxSearchのバージョンを教えていただいてよいでしょうか?
https://github.com/extras-evolution/ajaxSearch
最新版はこちらです。
https://github.com/extras-evolution/aja ... 0bc1652f21
groupbyまわりの修正が入っているので動作しそうな気がします。
https://github.com/extras-evolution/ajaxSearch
最新版はこちらです。
https://github.com/extras-evolution/aja ... 0bc1652f21
groupbyまわりの修正が入っているので動作しそうな気がします。
1.0.22Jベータです
ajaxSearchの件です。
申し訳ありません、
https://github.com/modxcms/AjaxSearch/a ... opment.zip
こちらのバージョン1.10.1のままでした。
教えていただいた、MAMP PHP7.2.14の方で、1.12.1にしてみたところ、エラーメッセージが変わりました。
【non-ajaxモード】
« MODX Parse Error »
MODX encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error : count(): Parameter must be an array or an object that implements Countable
ErrorType[num] : WARNING[2]
File : /Users/y/Documents/MAMP/www/assets/snippets/ajaxSearch/classes/ajaxSearchResults.class.inc.php
Line : 1028
Source : $nbr = count($results);
Backtrace
1 $modx->executeParser()
index.php on line 124
2 $modx->prepareResponse()
manager/includes/document.parser.class.inc.php on line 271
3 $modx->outputContent()
manager/includes/document.parser.class.inc.php on line 534
4 $modx->parseNonCachedSnippets()
manager/includes/document.parser.class.inc.php on line 615
5 $modx->parseDocumentSource()
manager/includes/document.parser.class.inc.php on line 740
6 $modx->invokeEvent()
manager/includes/document.parser.class.inc.php on line 2794
7 $modx->evalPlugin()
manager/includes/document.parser.class.inc.php on line 3930
8 eval()
manager/includes/document.parser.class.inc.php on line 2170
9 PHxParser->OnParseDocument()
manager/includes/document.parser.class.inc.php(2170) : eval()'d code on line 24
10 PHxParser->Parse()
assets/plugins/phx/phx.parser.class.inc.php on line 47
11 PHxParser->ParseValues()
assets/plugins/phx/phx.parser.class.inc.php on line 65
12 $modx->evalSnippets()
assets/plugins/phx/phx.parser.class.inc.php on line 140
13 $modx->_get_snip_result()
manager/includes/document.parser.class.inc.php on line 2315
14 $modx->evalSnippet()
manager/includes/document.parser.class.inc.php on line 2377
15 eval()
manager/includes/document.parser.class.inc.php on line 2238
16 require()
manager/includes/document.parser.class.inc.php(2238) : eval()'d code on line 18
17 AjaxSearch->run()
assets/snippets/ajaxSearch/snippet.ajaxSearch.php on line 431
18 AjaxSearchCtrl->run()
assets/snippets/ajaxSearch/classes/ajaxSearch.class.inc.php on line 89
19 AjaxSearchResults->getSearchResults()
assets/snippets/ajaxSearch/classes/ajaxSearchCtrl.class.inc.php on line 76
20 AjaxSearchResults->_doFilter()
assets/snippets/ajaxSearch/classes/ajaxSearchResults.class.inc.php on line 129
21 AjaxSearchResults->_doFilterTags()
assets/snippets/ajaxSearch/classes/ajaxSearchResults.class.inc.php on line 839
【ajaxモード】
« MODX Parse Error »
MODX encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error : count(): Parameter must be an array or an object that implements Countable
ErrorType[num] : WARNING[2]
File : /Users/y/Documents/MAMP/www/assets/snippets/ajaxSearch/classes/ajaxSearchResults.class.inc.php
Line : 1028
Source : $nbr = count($results);
Backtrace
1 $modx->executeParser()
index.php on line 124
2 $modx->prepareResponse()
manager/includes/document.parser.class.inc.php on line 271
3 $modx->outputContent()
manager/includes/document.parser.class.inc.php on line 534
4 $modx->parseNonCachedSnippets()
manager/includes/document.parser.class.inc.php on line 615
5 $modx->parseDocumentSource()
manager/includes/document.parser.class.inc.php on line 740
6 $modx->invokeEvent()
manager/includes/document.parser.class.inc.php on line 2794
7 $modx->evalPlugin()
manager/includes/document.parser.class.inc.php on line 3930
8 eval()
manager/includes/document.parser.class.inc.php on line 2170
9 PHxParser->OnParseDocument()
manager/includes/document.parser.class.inc.php(2170) : eval()'d code on line 24
10 PHxParser->Parse()
assets/plugins/phx/phx.parser.class.inc.php on line 47
11 PHxParser->ParseValues()
assets/plugins/phx/phx.parser.class.inc.php on line 65
12 $modx->evalSnippets()
assets/plugins/phx/phx.parser.class.inc.php on line 140
13 $modx->_get_snip_result()
manager/includes/document.parser.class.inc.php on line 2315
14 $modx->evalSnippet()
manager/includes/document.parser.class.inc.php on line 2377
15 eval()
manager/includes/document.parser.class.inc.php on line 2238
16 require()
manager/includes/document.parser.class.inc.php(2238) : eval()'d code on line 18
17 AjaxSearch->run()
assets/snippets/ajaxSearch/snippet.ajaxSearch.php on line 431
18 AjaxSearchCtrl->run()
assets/snippets/ajaxSearch/classes/ajaxSearch.class.inc.php on line 89
19 AjaxSearchResults->getSearchResults()
assets/snippets/ajaxSearch/classes/ajaxSearchCtrl.class.inc.php on line 76
20 AjaxSearchResults->_doFilter()
assets/snippets/ajaxSearch/classes/ajaxSearchResults.class.inc.php on line 129
21 AjaxSearchResults->_doFilterTags()
assets/snippets/ajaxSearch/classes/ajaxSearchResults.class.inc.php on line 839
お手数おかけいたします。よろしくお願いいたします。
申し訳ありません、
https://github.com/modxcms/AjaxSearch/a ... opment.zip
こちらのバージョン1.10.1のままでした。
教えていただいた、MAMP PHP7.2.14の方で、1.12.1にしてみたところ、エラーメッセージが変わりました。
【non-ajaxモード】
« MODX Parse Error »
MODX encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error : count(): Parameter must be an array or an object that implements Countable
ErrorType[num] : WARNING[2]
File : /Users/y/Documents/MAMP/www/assets/snippets/ajaxSearch/classes/ajaxSearchResults.class.inc.php
Line : 1028
Source : $nbr = count($results);
Backtrace
1 $modx->executeParser()
index.php on line 124
2 $modx->prepareResponse()
manager/includes/document.parser.class.inc.php on line 271
3 $modx->outputContent()
manager/includes/document.parser.class.inc.php on line 534
4 $modx->parseNonCachedSnippets()
manager/includes/document.parser.class.inc.php on line 615
5 $modx->parseDocumentSource()
manager/includes/document.parser.class.inc.php on line 740
6 $modx->invokeEvent()
manager/includes/document.parser.class.inc.php on line 2794
7 $modx->evalPlugin()
manager/includes/document.parser.class.inc.php on line 3930
8 eval()
manager/includes/document.parser.class.inc.php on line 2170
9 PHxParser->OnParseDocument()
manager/includes/document.parser.class.inc.php(2170) : eval()'d code on line 24
10 PHxParser->Parse()
assets/plugins/phx/phx.parser.class.inc.php on line 47
11 PHxParser->ParseValues()
assets/plugins/phx/phx.parser.class.inc.php on line 65
12 $modx->evalSnippets()
assets/plugins/phx/phx.parser.class.inc.php on line 140
13 $modx->_get_snip_result()
manager/includes/document.parser.class.inc.php on line 2315
14 $modx->evalSnippet()
manager/includes/document.parser.class.inc.php on line 2377
15 eval()
manager/includes/document.parser.class.inc.php on line 2238
16 require()
manager/includes/document.parser.class.inc.php(2238) : eval()'d code on line 18
17 AjaxSearch->run()
assets/snippets/ajaxSearch/snippet.ajaxSearch.php on line 431
18 AjaxSearchCtrl->run()
assets/snippets/ajaxSearch/classes/ajaxSearch.class.inc.php on line 89
19 AjaxSearchResults->getSearchResults()
assets/snippets/ajaxSearch/classes/ajaxSearchCtrl.class.inc.php on line 76
20 AjaxSearchResults->_doFilter()
assets/snippets/ajaxSearch/classes/ajaxSearchResults.class.inc.php on line 129
21 AjaxSearchResults->_doFilterTags()
assets/snippets/ajaxSearch/classes/ajaxSearchResults.class.inc.php on line 839
【ajaxモード】
« MODX Parse Error »
MODX encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error : count(): Parameter must be an array or an object that implements Countable
ErrorType[num] : WARNING[2]
File : /Users/y/Documents/MAMP/www/assets/snippets/ajaxSearch/classes/ajaxSearchResults.class.inc.php
Line : 1028
Source : $nbr = count($results);
Backtrace
1 $modx->executeParser()
index.php on line 124
2 $modx->prepareResponse()
manager/includes/document.parser.class.inc.php on line 271
3 $modx->outputContent()
manager/includes/document.parser.class.inc.php on line 534
4 $modx->parseNonCachedSnippets()
manager/includes/document.parser.class.inc.php on line 615
5 $modx->parseDocumentSource()
manager/includes/document.parser.class.inc.php on line 740
6 $modx->invokeEvent()
manager/includes/document.parser.class.inc.php on line 2794
7 $modx->evalPlugin()
manager/includes/document.parser.class.inc.php on line 3930
8 eval()
manager/includes/document.parser.class.inc.php on line 2170
9 PHxParser->OnParseDocument()
manager/includes/document.parser.class.inc.php(2170) : eval()'d code on line 24
10 PHxParser->Parse()
assets/plugins/phx/phx.parser.class.inc.php on line 47
11 PHxParser->ParseValues()
assets/plugins/phx/phx.parser.class.inc.php on line 65
12 $modx->evalSnippets()
assets/plugins/phx/phx.parser.class.inc.php on line 140
13 $modx->_get_snip_result()
manager/includes/document.parser.class.inc.php on line 2315
14 $modx->evalSnippet()
manager/includes/document.parser.class.inc.php on line 2377
15 eval()
manager/includes/document.parser.class.inc.php on line 2238
16 require()
manager/includes/document.parser.class.inc.php(2238) : eval()'d code on line 18
17 AjaxSearch->run()
assets/snippets/ajaxSearch/snippet.ajaxSearch.php on line 431
18 AjaxSearchCtrl->run()
assets/snippets/ajaxSearch/classes/ajaxSearch.class.inc.php on line 89
19 AjaxSearchResults->getSearchResults()
assets/snippets/ajaxSearch/classes/ajaxSearchCtrl.class.inc.php on line 76
20 AjaxSearchResults->_doFilter()
assets/snippets/ajaxSearch/classes/ajaxSearchResults.class.inc.php on line 129
21 AjaxSearchResults->_doFilterTags()
assets/snippets/ajaxSearch/classes/ajaxSearchResults.class.inc.php on line 839
お手数おかけいたします。よろしくお願いいたします。
1.0.22Jベータです
コード: 全て選択
Parameter must be an array or an object that implements Countable
1.0.22Jベータです
ありがとうございます。よろしくお願いいたします。
1.0.22Jベータです
動作確認ありがとうございます、助かります。
いろいろ修正しています。
添付のclassesフォルダをajaxSearchフォルダ内に上書きしていただいてよいでしょうか?いろいろ修正しています。
1.0.22Jベータです
他にも不具合っぽいところがいろいろあったので気がついた範囲で修正しました。
1.0.22Jベータです
早速対応いただきありがとうございます。
入れ替えた所うまくいかなかったので、最初に上げていただいているclassフォルダ、ajaxSearchフォルダ順に試してみました。
【昨日のAjaxSearch 1.12.1に、class.zip上書き】
【ajaxモード】
左上に "> が表示され 他のJSが止まってしまったので、ソースを見たところ、
挿入されるコードの一部がおかしくなっていました。
【non ajaxモード】
以下のエラーが表示されました。
Error : Invalid argument supplied for foreach()
ErrorType[num] : WARNING[2]
File : /Users/y/Documents/MAMP/www/assets/snippets/ajaxSearch/classes/ajaxSearchResults.class.inc.php
Line : 1039
Source : foreach ($results as $iValue) {
Backtrace
1 $modx->executeParser()
index.php on line 124
2 $modx->prepareResponse()
manager/includes/document.parser.class.inc.php on line 271
3 $modx->outputContent()
manager/includes/document.parser.class.inc.php on line 534
4 $modx->parseNonCachedSnippets()
manager/includes/document.parser.class.inc.php on line 615
5 $modx->parseDocumentSource()
manager/includes/document.parser.class.inc.php on line 740
6 $modx->invokeEvent()
manager/includes/document.parser.class.inc.php on line 2794
7 $modx->evalPlugin()
manager/includes/document.parser.class.inc.php on line 3930
8 eval()
manager/includes/document.parser.class.inc.php on line 2170
9 PHxParser->OnParseDocument()
manager/includes/document.parser.class.inc.php(2170) : eval()'d code on line 24
10 PHxParser->Parse()
assets/plugins/phx/phx.parser.class.inc.php on line 47
11 PHxParser->ParseValues()
assets/plugins/phx/phx.parser.class.inc.php on line 65
12 $modx->evalSnippets()
assets/plugins/phx/phx.parser.class.inc.php on line 140
13 $modx->_get_snip_result()
manager/includes/document.parser.class.inc.php on line 2315
14 $modx->evalSnippet()
manager/includes/document.parser.class.inc.php on line 2377
15 eval()
manager/includes/document.parser.class.inc.php on line 2238
16 require()
manager/includes/document.parser.class.inc.php(2238) : eval()'d code on line 18
17 AjaxSearch->run()
assets/snippets/ajaxSearch/snippet.ajaxSearch.php on line 431
18 AjaxSearchCtrl->run()
assets/snippets/ajaxSearch/classes/ajaxSearch.class.inc.php on line 92
19 AjaxSearchResults->getSearchResults()
assets/snippets/ajaxSearch/classes/ajaxSearchCtrl.class.inc.php on line 76
20 AjaxSearchResults->_doFilter()
assets/snippets/ajaxSearch/classes/ajaxSearchResults.class.inc.php on line 129
21 AjaxSearchResults->_doFilterTags()
assets/snippets/ajaxSearch/classes/ajaxSearchResults.class.inc.php on line 839
【いただいたajaxSearchフォルダに入れ替え】
【ajaxモード】
classフォルダのみ上書き時と同様でした。
【non ajaxモード】
検索結果ページまでいくようになりましたが、検索結果は空になっています。
イベントログ内にもエラーは表示されていません。
よろしくお願いいたします。
入れ替えた所うまくいかなかったので、最初に上げていただいているclassフォルダ、ajaxSearchフォルダ順に試してみました。
【昨日のAjaxSearch 1.12.1に、class.zip上書き】
【ajaxモード】
左上に "> が表示され 他のJSが止まってしまったので、ソースを見たところ、
挿入されるコードの一部がおかしくなっていました。
コード: 全て選択
<script type="text/javascript" src="assets/snippets/ajaxSearch/js/ajaxSearch1/ajaxSearch-jquery.js"></script>
<script type="text/javascript" src=">
【non ajaxモード】
以下のエラーが表示されました。
Error : Invalid argument supplied for foreach()
ErrorType[num] : WARNING[2]
File : /Users/y/Documents/MAMP/www/assets/snippets/ajaxSearch/classes/ajaxSearchResults.class.inc.php
Line : 1039
Source : foreach ($results as $iValue) {
Backtrace
1 $modx->executeParser()
index.php on line 124
2 $modx->prepareResponse()
manager/includes/document.parser.class.inc.php on line 271
3 $modx->outputContent()
manager/includes/document.parser.class.inc.php on line 534
4 $modx->parseNonCachedSnippets()
manager/includes/document.parser.class.inc.php on line 615
5 $modx->parseDocumentSource()
manager/includes/document.parser.class.inc.php on line 740
6 $modx->invokeEvent()
manager/includes/document.parser.class.inc.php on line 2794
7 $modx->evalPlugin()
manager/includes/document.parser.class.inc.php on line 3930
8 eval()
manager/includes/document.parser.class.inc.php on line 2170
9 PHxParser->OnParseDocument()
manager/includes/document.parser.class.inc.php(2170) : eval()'d code on line 24
10 PHxParser->Parse()
assets/plugins/phx/phx.parser.class.inc.php on line 47
11 PHxParser->ParseValues()
assets/plugins/phx/phx.parser.class.inc.php on line 65
12 $modx->evalSnippets()
assets/plugins/phx/phx.parser.class.inc.php on line 140
13 $modx->_get_snip_result()
manager/includes/document.parser.class.inc.php on line 2315
14 $modx->evalSnippet()
manager/includes/document.parser.class.inc.php on line 2377
15 eval()
manager/includes/document.parser.class.inc.php on line 2238
16 require()
manager/includes/document.parser.class.inc.php(2238) : eval()'d code on line 18
17 AjaxSearch->run()
assets/snippets/ajaxSearch/snippet.ajaxSearch.php on line 431
18 AjaxSearchCtrl->run()
assets/snippets/ajaxSearch/classes/ajaxSearch.class.inc.php on line 92
19 AjaxSearchResults->getSearchResults()
assets/snippets/ajaxSearch/classes/ajaxSearchCtrl.class.inc.php on line 76
20 AjaxSearchResults->_doFilter()
assets/snippets/ajaxSearch/classes/ajaxSearchResults.class.inc.php on line 129
21 AjaxSearchResults->_doFilterTags()
assets/snippets/ajaxSearch/classes/ajaxSearchResults.class.inc.php on line 839
【いただいたajaxSearchフォルダに入れ替え】
【ajaxモード】
classフォルダのみ上書き時と同様でした。
【non ajaxモード】
検索結果ページまでいくようになりましたが、検索結果は空になっています。
イベントログ内にもエラーは表示されていません。
よろしくお願いいたします。
1.0.22Jベータです
ajaxSearch1.10.1の挿入されるコード
いただいたajaxSearch1.12.1の挿入されるコード
一旦1.10.1に戻して確認してみました。
どうぞよろしくお願いいたします。
コード: 全て選択
<script type="text/javascript" src="assets/snippets/ajaxSearch/js/ajaxSearch1/ajaxSearch-jquery.js"></script>
<!-- start AjaxSearch header -->
<script type="text/javascript">
//<![CDATA[
asvar=new Array();asvar[0]='{"vsn":"1.10.1","adv":"allwords","sub":"","bxt":"","cfg":"&config=`test` "}';
//]]>
</script>
<!-- end AjaxSearch header -->
<script type="text/javascript" src="assets/snippets/ajaxSearch/js/comment/ajaxSearchCmt.js"></script>
いただいたajaxSearch1.12.1の挿入されるコード
コード: 全て選択
<script type="text/javascript" src="assets/snippets/ajaxSearch/js/ajaxSearch1/ajaxSearch-jquery.js"></script>
<script type="text/javascript" src=">
//<![CDATA[
asvar=new Array();asvar[0]='{"vsn":"1.12.1","adv":"allwords","sub":"","bxt":"キーワードを入力","cfg":"&config=`test` "}';
//]]>
</script>
<!-- end AjaxSearch header -->"></script>
<script type="text/javascript" src="assets/snippets/ajaxSearch/js/comment/ajaxSearchCmt.js"></script>
どうぞよろしくお願いいたします。
1.0.22Jベータです
バージョンを更新したので、もしかするとスニペットコードを貼り付け直す必要がありかもしれません。
あと、自分のクライアント環境ではmootoolsが動作しなかったので、デフォルトのjsをjQueryに変更しました。
1.0.22Jベータです
ありがとうございます。
ajaxSearchを入れ替えて、デフォルトのconfigで試すとエラーも無く動いたのですが、
元々の使っていたconfigを試した所、エラーが出たので、
デフォルトのconfigに、パラメータを移しながら見てみました。
とりあえず、まだnon-ajaxの方しか見れていないのですが、
● withTvs にテンプレート変数名が入ると、検索結果が空になってしまうようです。(エラー等は特にでません)
● asLog に 2:1:200 とすると、以下のエラーが画面に表示されました。
週明けにajaxモードの方も見てみます。
どうぞよろしくお願いいたします。
ajaxSearchを入れ替えて、デフォルトのconfigで試すとエラーも無く動いたのですが、
元々の使っていたconfigを試した所、エラーが出たので、
デフォルトのconfigに、パラメータを移しながら見てみました。
とりあえず、まだnon-ajaxの方しか見れていないのですが、
● withTvs にテンプレート変数名が入ると、検索結果が空になってしまうようです。(エラー等は特にでません)
● asLog に 2:1:200 とすると、以下のエラーが画面に表示されました。
コード: 全て選択
Fatal error: Uncaught Error: Call to undefined method AjaxSearchLog::purgeLogs() in /Users/y/Documents/MAMP/www/assets/snippets/ajaxSearch/classes/ajaxSearchLog.class.inc.php:110 Stack trace: #0 /Users/y/Documents/MAMP/www/assets/snippets/ajaxSearch/classes/ajaxSearchOutput.class.inc.php(885): AjaxSearchLog->setLogRecord(Array) #1 /Users/y/Documents/MAMP/www/assets/snippets/ajaxSearch/classes/ajaxSearchOutput.class.inc.php(226): AjaxSearchOutput->_setSuccessfullSearches(0) #2 /Users/y/Documents/MAMP/www/assets/snippets/ajaxSearch/classes/ajaxSearchOutput.class.inc.php(116): AjaxSearchOutput->_displayResults(true, '', NULL) #3 /Users/y/Documents/MAMP/www/assets/snippets/ajaxSearch/classes/ajaxSearchCtrl.class.inc.php(87): AjaxSearchOutput->display(true, '') #4 /Users/y/Documents/MAMP/www/assets/snippets/ajaxSearch/classes/ajaxSearch.class.inc.php(92): AjaxSearchCtrl->run() #5 /Users/y/Documents/MAMP/www/assets/snippets/ajaxSearch/snippet.ajaxSearch.php(443): AjaxSearch->run(1557507808.3311, Array, Array) #6 /Users/y/Docume in /Users/y/Documents/MAMP/www/assets/snippets/ajaxSearch/classes/ajaxSearchLog.class.inc.php on line 110
どうぞよろしくお願いいたします。
1.0.22Jベータです
withTvsパラメータのほうは問題を再現できませんでした。スニペットコールやconfigの内容などを教えていただいてよいでしょうか?
ajaxSearchが動作しない
ご対応いただきありがとうございます。
asLogの件、新しいものに上書きすることで、エラーも無くなりLog Managerに入ってくるようになりました。ありがとうございます。
withTvsの方ですが、もしかして書き方が変わったとかありますでしょうか?
デフォルトのdefault.config.phpで、動くのは確認できましたので、
(「しみず」←(pagetitleの一部です)で検索すると結果が出ます。)
これに
と、'withTvs'行だけ変更して、同ワードで検索すると、見つかりませんとなります。
MAMP内のサイトの環境が問題かと思い、今朝再度、さくらインターネット上の1.0.20Jで稼働中のサイトに入れ替えてみましたが、
新しいajaxSearchにすると、Ajaxモード、non-Ajaxモード同様でした。
お手数おかけいたします。どうぞよろしくお願いいたします。
asLogの件、新しいものに上書きすることで、エラーも無くなりLog Managerに入ってくるようになりました。ありがとうございます。
withTvsの方ですが、もしかして書き方が変わったとかありますでしょうか?
デフォルトのdefault.config.phpで、動くのは確認できましたので、
(「しみず」←(pagetitleの一部です)で検索すると結果が出ます。)
これに
コード: 全て選択
$dcfg['withTvs'] = 'M_en,M_kana';
MAMP内のサイトの環境が問題かと思い、今朝再度、さくらインターネット上の1.0.20Jで稼働中のサイトに入れ替えてみましたが、
新しいajaxSearchにすると、Ajaxモード、non-Ajaxモード同様でした。
お手数おかけいたします。どうぞよろしくお願いいたします。
最後に編集したユーザー ifactory [ 2019年5月13日(月) 19:50 ], 累計 2 回
ajaxSearchが動作しない
debugモードがあったので、両方やってみました。
【withTvsは空、検索できる場合】
【withTvsに'M_en,M_kana'、検索できない場合】
どうぞよろしくお願いいたします。
【withTvsは空、検索できる場合】
コード: 全て選択
[13-May-19 12:25:45] 0.0087s 3.95Mb > AjaxSearch 1.13.0Php7.2.14MySql 5.7.25
[13-May-19 12:25:45] 0.0090s 3.95Mb > displayConfig - Config before parameter checking : Array
(
[version] => 1.13.0
[config] =>
[debug] => 1
[timeLimit] => 60
[language] => japanese-utf8
[asId] =>
[ajaxSearch] => 1
[advSearch] => oneword
[whereSearch] => content|tv
[sites] =>
[subSearch] =>
[category] =>
[display] => unmixed
[tags] =>
[init] => none
[withTvs] =>
[tvPhx] =>
[order] => publishedon,pagetitle
[rank] =>
[maxWords] => 5
[minChars] => 3
[showInputForm] => 1
[showIntro] => 1
[resultsPage] => 0
[grabMax] => 6
[extract] => 1:content,description,introtext,tv_value
[extractLength] => 200
[extractEllips] => ...
[extractSeparator] => <br />
[formatDate] => Y/m/d : H:i:s
[highlightResult] => 1
[pagingType] => 1
[showPagingAlways] => 0
[pageLinkSeparator] => |
[landingPage] =>
[showResults] => 1
[parents] =>
[documents] =>
[depth] => 10
[hideMenu] => 2
[hideLink] => 0
[filter] =>
[output] => 0
[tplInput] => @FILE:assets/snippets/ajaxSearch/templates/input.tpl.html
[tplResults] => @FILE:assets/snippets/ajaxSearch/templates/results.tpl.html
[tplGrpResult] => @FILE:assets/snippets/ajaxSearch/templates/grpResult.tpl.html
[tplResult] => @FILE:assets/snippets/ajaxSearch/templates/result.tpl.html
[tplPaging0] => @FILE:assets/snippets/ajaxSearch/templates/paging0.tpl.html
[tplPaging1] => @FILE:assets/snippets/ajaxSearch/templates/paging1.tpl.html
[tplComment] => @FILE:assets/snippets/ajaxSearch/templates/comment.tpl.html
[stripInput] => defaultStripInput
[stripOutput] => defaultStripOutput
[searchWordList] =>
[breadcrumbs] =>
[clearDefault] => 0
[jsClearDefault] => /assets/snippets/ajaxSearch/js/clearDefault/clearDefault.js
[mbstring] => 1
[asLog] => 0:0:200
[liveSearch] => 0
[ajaxMax] => 5
[showMoreResults] => 0
[moreResultsPage] => 0
[opacity] => 1
[tplAjaxResults] => @FILE:assets/snippets/ajaxSearch/templates/ajaxResults.tpl.html
[tplAjaxGrpResult] => @FILE:assets/snippets/ajaxSearch/templates/ajaxGrpResult.tpl.html
[tplAjaxResult] => @FILE:assets/snippets/ajaxSearch/templates/ajaxResult.tpl.html
[tplPaging2] => @FILE:assets/snippets/ajaxSearch/templates/paging2.tpl.html
[jscript] => jquery
[addJscript] => 1
[jsMooTools] => http://localhost:8888/manager/media/script/mootools/mootools.js
[jsMooTools2] => /assets/snippets/ajaxSearch/js/mootools2/mootools-1.2.4.js
[jsJquery] => assets/snippets/ajaxSearch/js/jquery/jquery.min.js
)
[13-May-19 12:25:45] 0.0145s 4.01Mb > AjaxSearch - pcre.backtrack_limit : 1000000
[13-May-19 12:25:45] 0.0147s 4.01Mb > getSearchString - searchString : しみず
[13-May-19 12:25:45] 0.0147s 4.01Mb > getSearchString - advSearch : oneword
[13-May-19 12:25:45] 0.0148s 4.01Mb > getEvents - subsearch :
[13-May-19 12:25:45] 0.0149s 4.01Mb > getEvents - asf :
[13-May-19 12:25:45] 0.0149s 4.01Mb > getEvents - offset : 0,0
[13-May-19 12:25:45] 0.0149s 4.01Mb > getEvents - pgn :
[13-May-19 12:25:45] 0.0150s 4.01Mb > checkSearchString - searchString : しみず
[13-May-19 12:25:45] 0.0150s 4.01Mb > checkSearchString - searchSubmitted : 1
[13-May-19 12:25:45] 0.0151s 4.01Mb > checkSearchString - asfSubmitted :
[13-May-19 12:25:45] 0.0151s 4.01Mb > checkSearchString - checkString : 1
[13-May-19 12:25:45] 0.0152s 4.01Mb > checkSearchString - searchString used : しみず
[13-May-19 12:25:45] 0.0178s 4.09Mb > displayInputForm - searchString : しみず
[13-May-19 12:25:45] 0.0179s 4.09Mb > displayInputForm - searchString : しみず
[13-May-19 12:25:45] 0.0218s 4.22Mb > pgCharset : UTF-8
[13-May-19 12:25:45] 0.0225s 4.23Mb > Select :
SELECT sc.id, sc.pagetitle, sc.longtitle, sc.description, sc.alias, sc.introtext, sc.template, sc.menutitle, sc.content, sc.publishedon,
GROUP_CONCAT( DISTINCT CAST(ntv.id AS CHAR) SEPARATOR "," ) AS tv_id,
GROUP_CONCAT( DISTINCT ntv.value SEPARATOR "," ) AS tv_value
FROM `modx_site_content` sc
LEFT JOIN(
SELECT DISTINCT tv.id, tv.value, tv.contentid
FROM `modx_site_tmplvar_contentvalues` tv ) AS ntv ON sc.id = ntv.contentid
WHERE ((sc.published=1) AND (sc.searchable=1) AND (sc.deleted=0) AND (sc.privateweb=0)) AND (((sc.pagetitle LIKE '%しみず%') OR (sc.longtitle LIKE '%しみず%') OR (sc.description LIKE '%しみず%') OR (sc.alias LIKE '%しみず%') OR (sc.introtext LIKE '%しみず%') OR (sc.menutitle LIKE '%しみず%') OR (sc.content LIKE '%しみず%') OR (ntv.value LIKE '%しみず%')))
GROUP BY sc.id, sc.pagetitle, sc.longtitle, sc.description, sc.alias, sc.introtext, sc.template, sc.menutitle, sc.content, sc.publishedon
ORDER BY `publishedon`,`pagetitle`
[13-May-19 12:25:45] 0.0777s 4.25Mb > End of select
[13-May-19 12:25:45] 0.0852s 4.86Mb > AjaxSearch - Elapsed Time : 0.0852s
【withTvsに'M_en,M_kana'、検索できない場合】
コード: 全て選択
[13-May-19 12:24:51] 0.0112s 3.95Mb > AjaxSearch 1.13.0Php7.2.14MySql 5.7.25
[13-May-19 12:24:51] 0.0116s 3.95Mb > displayConfig - Config before parameter checking : Array
(
[version] => 1.13.0
[config] =>
[debug] => 1
[timeLimit] => 60
[language] => japanese-utf8
[asId] =>
[ajaxSearch] => 1
[advSearch] => oneword
[whereSearch] => content|tv
[sites] =>
[subSearch] =>
[category] =>
[display] => unmixed
[tags] =>
[init] => none
[withTvs] => M_en,M_kana
[tvPhx] =>
[order] => publishedon,pagetitle
[rank] =>
[maxWords] => 5
[minChars] => 3
[showInputForm] => 1
[showIntro] => 1
[resultsPage] => 0
[grabMax] => 6
[extract] => 1:content,description,introtext,tv_value
[extractLength] => 200
[extractEllips] => ...
[extractSeparator] => <br />
[formatDate] => Y/m/d : H:i:s
[highlightResult] => 1
[pagingType] => 1
[showPagingAlways] => 0
[pageLinkSeparator] => |
[landingPage] =>
[showResults] => 1
[parents] =>
[documents] =>
[depth] => 10
[hideMenu] => 2
[hideLink] => 0
[filter] =>
[output] => 0
[tplInput] => @FILE:assets/snippets/ajaxSearch/templates/input.tpl.html
[tplResults] => @FILE:assets/snippets/ajaxSearch/templates/results.tpl.html
[tplGrpResult] => @FILE:assets/snippets/ajaxSearch/templates/grpResult.tpl.html
[tplResult] => @FILE:assets/snippets/ajaxSearch/templates/result.tpl.html
[tplPaging0] => @FILE:assets/snippets/ajaxSearch/templates/paging0.tpl.html
[tplPaging1] => @FILE:assets/snippets/ajaxSearch/templates/paging1.tpl.html
[tplComment] => @FILE:assets/snippets/ajaxSearch/templates/comment.tpl.html
[stripInput] => defaultStripInput
[stripOutput] => defaultStripOutput
[searchWordList] =>
[breadcrumbs] =>
[clearDefault] => 0
[jsClearDefault] => /assets/snippets/ajaxSearch/js/clearDefault/clearDefault.js
[mbstring] => 1
[asLog] => 0:0:200
[liveSearch] => 0
[ajaxMax] => 5
[showMoreResults] => 0
[moreResultsPage] => 0
[opacity] => 1
[tplAjaxResults] => @FILE:assets/snippets/ajaxSearch/templates/ajaxResults.tpl.html
[tplAjaxGrpResult] => @FILE:assets/snippets/ajaxSearch/templates/ajaxGrpResult.tpl.html
[tplAjaxResult] => @FILE:assets/snippets/ajaxSearch/templates/ajaxResult.tpl.html
[tplPaging2] => @FILE:assets/snippets/ajaxSearch/templates/paging2.tpl.html
[jscript] => jquery
[addJscript] => 1
[jsMooTools] => http://localhost:8888/manager/media/script/mootools/mootools.js
[jsMooTools2] => /assets/snippets/ajaxSearch/js/mootools2/mootools-1.2.4.js
[jsJquery] => assets/snippets/ajaxSearch/js/jquery/jquery.min.js
)
[13-May-19 12:24:51] 0.0169s 4.01Mb > AjaxSearch - pcre.backtrack_limit : 1000000
[13-May-19 12:24:51] 0.0169s 4.01Mb > getSearchString - searchString : しみず
[13-May-19 12:24:51] 0.0170s 4.01Mb > getSearchString - advSearch : oneword
[13-May-19 12:24:51] 0.0170s 4.01Mb > getEvents - subsearch :
[13-May-19 12:24:51] 0.0170s 4.01Mb > getEvents - asf :
[13-May-19 12:24:51] 0.0170s 4.01Mb > getEvents - offset : 0,0
[13-May-19 12:24:51] 0.0171s 4.01Mb > getEvents - pgn :
[13-May-19 12:24:51] 0.0171s 4.01Mb > checkSearchString - searchString : しみず
[13-May-19 12:24:51] 0.0171s 4.01Mb > checkSearchString - searchSubmitted : 1
[13-May-19 12:24:51] 0.0171s 4.01Mb > checkSearchString - asfSubmitted :
[13-May-19 12:24:51] 0.0171s 4.01Mb > checkSearchString - checkString : 1
[13-May-19 12:24:51] 0.0172s 4.01Mb > checkSearchString - searchString used : しみず
[13-May-19 12:24:51] 0.0190s 4.09Mb > displayInputForm - searchString : しみず
[13-May-19 12:24:51] 0.0190s 4.09Mb > displayInputForm - searchString : しみず
[13-May-19 12:24:51] 0.0216s 4.22Mb > pgCharset : UTF-8
[13-May-19 12:24:51] 0.0222s 4.23Mb > initSearchContext - withTvs : Array
(
[0] => M_en
[1] => M_kana
)
[13-May-19 12:24:51] 0.0227s 4.24Mb > Select :
SELECT sc.id, sc.pagetitle, sc.longtitle, sc.description, sc.alias, sc.introtext, sc.template, sc.menutitle, sc.content, sc.publishedon,
GROUP_CONCAT( DISTINCT CAST(ntv.id AS CHAR) SEPARATOR "," ) AS tv_id,
GROUP_CONCAT( DISTINCT ntv.value SEPARATOR "," ) AS tv_value, ntv1.value AS `M_en`, ntv2.value AS `M_kana`
FROM `modx_site_content` sc
LEFT JOIN(
SELECT DISTINCT tv.id, tv.value, tv.contentid
FROM `modx_site_tmplvar_contentvalues` tv ) AS ntv ON sc.id = ntv.contentid
LEFT JOIN(
SELECT DISTINCT tv1.contentid , tv1.value
FROM `modx_site_tmplvar_contentvalues` tv1
WHERE tv1.tmplvarid = '2' ) AS ntv1 ON sc.id = ntv1.contentid
LEFT JOIN(
SELECT DISTINCT tv2.contentid , tv2.value
FROM `modx_site_tmplvar_contentvalues` tv2
WHERE tv2.tmplvarid = '3' ) AS ntv2 ON sc.id = ntv2.contentid
WHERE ((sc.published=1) AND (sc.searchable=1) AND (sc.deleted=0) AND (sc.privateweb=0)) AND (((sc.pagetitle LIKE '%しみず%') OR (sc.longtitle LIKE '%しみず%') OR (sc.description LIKE '%しみず%') OR (sc.alias LIKE '%しみず%') OR (sc.introtext LIKE '%しみず%') OR (sc.menutitle LIKE '%しみず%') OR (sc.content LIKE '%しみず%') OR (ntv.value LIKE '%しみず%') OR (`M_en` LIKE '%しみず%') OR (`M_kana` LIKE '%しみず%')))
GROUP BY sc.id, sc.pagetitle, sc.longtitle, sc.description, sc.alias, sc.introtext, sc.template, sc.menutitle, sc.content, sc.publishedon
ORDER BY `publishedon`,`pagetitle`
[13-May-19 12:24:51] 0.0230s 4.23Mb > End of select
[13-May-19 12:24:51] 0.0237s 4.25Mb > AjaxSearch - Elapsed Time : 0.0236s
ajaxSearchが動作しない
すみません。書き忘れていました。
スニペットコール
今回テストしたconfigです。(デフォルトconfigの$dcfg['withTvs'] = 'M_en,M_kana';のみ変更)
一応現在1.10.1で使用中のconfigです('version'のみ書き換えております)
(pagetitle,alias,M_en,M_kanaのみ検索対象に)
よろしくお願いいたします。
スニペットコール
コード: 全て選択
[!AjaxSearch?
&config=`ajax`
!]
コード: 全て選択
<?php
// Default configuration file - AjaxSearch 1.13.0
// Keep care all these values are required
$dcfg['version'] = '1.13.0';
$dcfg['config'] = '';
$dcfg['debug'] = 1;
$dcfg['timeLimit'] = 60;
$dcfg['language'] = $modx->config['manager_language'];
$dcfg['asId'] = '';
$dcfg['ajaxSearch'] = 1;
$dcfg['advSearch'] = 'oneword';
$dcfg['whereSearch'] = 'content|tv';
$dcfg['sites'] = '';
$dcfg['subSearch'] = '';
$dcfg['category'] = '';
$dcfg['display'] = 'unmixed';
$dcfg['tags'] = '';
$dcfg['init'] = 'none';
$dcfg['withTvs'] = 'M_en,M_kana';
$dcfg['tvPhx'] = '';
$dcfg['order'] = 'publishedon,pagetitle';
$dcfg['rank'] = '';
$dcfg['maxWords'] = 5;
$dcfg['minChars'] = 3;
$dcfg['showInputForm'] = 1;
$dcfg['showIntro'] = 1;
$dcfg['resultsPage'] = 0;
$dcfg['grabMax'] = 6;
$dcfg['extract'] = '1:content,description,introtext,tv_value';
$dcfg['extractLength'] = 200;
$dcfg['extractEllips'] = '...';
$dcfg['extractSeparator'] = '<br />';
$dcfg['formatDate'] = str_replace('%','',$modx->toDateFormat(null,'formatOnly')) . ' : H:i:s';
$dcfg['highlightResult'] = 1;
$dcfg['pagingType'] = 1;
$dcfg['showPagingAlways'] = 0;
$dcfg['pageLinkSeparator'] = ' | ';
$dcfg['landingPage'] = false;
$dcfg['showResults'] = true;
$dcfg['parents'] = '';
$dcfg['documents'] = '';
$dcfg['depth'] = 10;
$dcfg['hideMenu'] = 2;
$dcfg['hideLink'] = 0;
$dcfg['filter'] = '';
$dcfg['output'] = 0;
$dcfg['tplInput'] = '@FILE:' . AS_SPATH . 'templates/input.tpl.html';
$dcfg['tplResults'] = '@FILE:' . AS_SPATH . 'templates/results.tpl.html';
$dcfg['tplGrpResult'] = '@FILE:' . AS_SPATH . 'templates/grpResult.tpl.html';
$dcfg['tplResult'] = '@FILE:' . AS_SPATH . 'templates/result.tpl.html';
$dcfg['tplPaging0'] = '@FILE:' . AS_SPATH . 'templates/paging0.tpl.html';
$dcfg['tplPaging1'] = '@FILE:' . AS_SPATH . 'templates/paging1.tpl.html';
$dcfg['tplComment'] = '@FILE:' . AS_SPATH . 'templates/comment.tpl.html';
$dcfg['stripInput'] = 'defaultStripInput';
$dcfg['stripOutput'] = 'defaultStripOutput';
$dcfg['searchWordList'] = '';
$dcfg['breadcrumbs'] = '';
$dcfg['clearDefault'] = 0;
$dcfg['jsClearDefault'] = MODX_BASE_URL . AS_SPATH . 'js/clearDefault/clearDefault.js';
$dcfg['mbstring'] = 1;
$dcfg['asLog'] = '0:0:200';
$dcfg['liveSearch'] = 0;
$dcfg['ajaxMax'] = 5;
$dcfg['showMoreResults'] = 0;
$dcfg['moreResultsPage'] = 0;
$dcfg['opacity'] = 1.;
$dcfg['tplAjaxResults'] = '@FILE:' . AS_SPATH . 'templates/ajaxResults.tpl.html';
$dcfg['tplAjaxGrpResult'] = '@FILE:' . AS_SPATH . 'templates/ajaxGrpResult.tpl.html';
$dcfg['tplAjaxResult'] = '@FILE:' . AS_SPATH . 'templates/ajaxResult.tpl.html';
$dcfg['tplPaging2'] = '@FILE:' . AS_SPATH . 'templates/paging2.tpl.html';
$dcfg['jscript'] = 'jquery';
$dcfg['addJscript'] = 1;
$dcfg['jsMooTools'] = MODX_MANAGER_URL.'media/script/mootools/mootools.js';
$dcfg['jsMooTools2'] = MODX_BASE_URL . AS_SPATH . 'js/mootools2/mootools-1.2.4.js';
$dcfg['jsJquery'] = 'assets/snippets/ajaxSearch/js/jquery/jquery.min.js';
// For a global parameter initialisation use the following syntax $__param = 'value';
// To overwrite parameter snippet call use $param = 'value';
一応現在1.10.1で使用中のconfigです('version'のみ書き換えております)
(pagetitle,alias,M_en,M_kanaのみ検索対象に)
コード: 全て選択
<?php
// Default configuration file - AjaxSearch 1.13.0
// Keep care all these values are required
$dcfg['version'] = '1.13.0';
$dcfg['config'] = '';
$dcfg['debug'] = 0;
$dcfg['timeLimit'] = 60;
$dcfg['language'] = $modx->config['manager_language'];
$dcfg['asId'] = '';
$dcfg['ajaxSearch'] = 1;
$dcfg['advSearch'] = 'allwords';
$dcfg['whereSearch'] = 'content:pagetitle,alias';
$dcfg['sites'] = '';
$dcfg['subSearch'] = '';
$dcfg['category'] = '';
$dcfg['display'] = 'unmixed';
$dcfg['tags'] = '';
$dcfg['init'] = 'none';
$dcfg['withTvs'] = 'M_en,M_kana';
$dcfg['tvPhx'] = '';
$dcfg['order'] = 'publishedon,pagetitle';
$dcfg['rank'] = '';
$dcfg['maxWords'] = 5;
$dcfg['minChars'] = 1;
$dcfg['showInputForm'] = 1;
$dcfg['showIntro'] = 0;
$dcfg['resultsPage'] = 0;
$dcfg['grabMax'] = 10;
$dcfg['extract'] = '1:content,description,introtext,tv_value';
$dcfg['extractLength'] = 200;
$dcfg['extractEllips'] = '...';
$dcfg['extractSeparator'] = '<br>';
$dcfg['formatDate'] = 'Y/m/d : H:M:s';
$dcfg['highlightResult'] = 1;
$dcfg['pagingType'] = 1;
$dcfg['showPagingAlways'] = 0;
$dcfg['pageLinkSeparator'] = ' | ';
$dcfg['landingPage'] = false;
$dcfg['showResults'] = true;
$dcfg['parents'] = '5';
$dcfg['documents'] = '';
$dcfg['depth'] = 10;
$dcfg['hideMenu'] = 2;
$dcfg['hideLink'] = 0;
$dcfg['filter'] = '';
$dcfg['output'] = 0;
$dcfg['tplInput'] = 'tplInput';
$dcfg['tplResults'] = 'tplResults';
$dcfg['tplGrpResult'] = 'tplGrpResult';
$dcfg['tplResult'] = 'tplResult';
$dcfg['tplPaging0'] = 'tplPaging0';
$dcfg['tplPaging1'] = 'tplPaging1';
$dcfg['tplComment'] = 'tplComment';
$dcfg['stripInput'] = 'defaultStripInput';
$dcfg['stripOutput'] = 'defaultStripOutput';
$dcfg['searchWordList'] = '';
$dcfg['breadcrumbs'] = '';
$dcfg['clearDefault'] = 0;
$dcfg['jsClearDefault'] = MODX_BASE_URL . AS_SPATH . 'js/clearDefault/clearDefault.js';
$dcfg['mbstring'] = 1;
$dcfg['asLog'] = '0:0:200';
$dcfg['liveSearch'] = 0;
$dcfg['ajaxMax'] = 5;
$dcfg['showMoreResults'] = 0;
$dcfg['moreResultsPage'] = 0;
$dcfg['opacity'] = 1.;
$dcfg['tplAjaxResults'] = 'tplajaxResults';
$dcfg['tplAjaxGrpResult'] = 'tplajaxGrpResult';
$dcfg['tplAjaxResult'] = 'tplajaxResult';
$dcfg['tplPaging2'] = 'tplPaging2';
$dcfg['jscript'] = 'jquery';
$dcfg['addJscript'] = 1;
$dcfg['jsMooTools'] = MODX_BASE_URL . 'manager/media/script/mootools/mootools.js';
$dcfg['jsMooTools2'] = MODX_BASE_URL . AS_SPATH . 'js/mootools2/mootools-1.2.4.js';
$dcfg['jsJquery'] = '';
// For a global parameter initialisation use the following syntax $__param = 'value';
// To overwrite parameter snippet call use $param = 'value';
?>
ajaxSearchが動作しない
情報ありがとうございます。debugモードの情報を見ると、前者はwithTvsの値が空ですし、
後者はwhere文がおかしなことになってますね。ほぼevo本体の問題とは関係なさそうですが、
詳細を調べてみます。
後者はwhere文がおかしなことになってますね。ほぼevo本体の問題とは関係なさそうですが、
詳細を調べてみます。
ajaxSearchが動作しない
お手数をおかけいたします。
よろしくお願いいたします。
よろしくお願いいたします。