Forum

Thread tagged as: Question, Problem, Runway

Search with Collections

My search.php is not picking up new images / keywords added to collections since upgraded to Runway.

I converted my portfolio of photos to collections. It works fine with previous items just does not pick up keywords etc from newly added ones. ~ ~ ~ <div class="primary-content">

    <?php
$query = perch_get('q');
perch_content_search($query, array(
   'apps' => array('PerchContent'),
  'paginate'=> false,
'count' => 1000,
  ));    ?>

    </div>
    <div style="position:relative; float:left; width:100%; text-align:center;">
    <nav class="sidebar">
       <?php perch_search_form(); ?>
    </nav></div>
<!--/content--->

</div> ~ ~ ~

~ ~ ~ <perch:form id="search" method="get" action="/search.php"> <div> <perch:label for="q"></perch:label> <perch:input type="search" id="q" /> <perch:input type="submit" value="search" /> </div> </perch:form> ~ ~ ~

Denise Courtney

Denise Courtney 0 points

  • 5 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Please post your Diagnostics Report - thanks!

Added a unique keyword 'detail' and performed search. No results. Debug below: Debug Message ~ ~ ~ [1] SELECT * FROM perch2_pages WHERE pagePath='/search.php' LIMIT 1 Using template: /templates/search/search-form.html [2] SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='/search.php' OR regionPage='' ORDER BY regionPage DESC Search term: detail [36] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0 [nil] SELECT SQL_CALC_FOUND_ROWS DISTINCT 'PerchContent_SearchHandler' AS source, MATCH(ci.itemSearch) AGAINST('detail') AS score, r.regionPage AS col1, ci.itemSearch AS col2, ci.itemJSON AS col3, r.regionOptions AS col4, p.pageNavText AS col5, p.pageTitle AS col6, regionTemplate AS col7, r.regionKey AS col8 FROM perch2_content_regions r, perch2_content_items ci, perch2_pages p WHERE r.regionID=ci.regionID AND r.regionRev=ci.itemRev AND r.pageID=p.pageID AND r.regionPage!='' AND r.regionSearchable=1 AND (MATCH(ci.itemSearch) AGAINST('detail') OR MATCH(ci.itemSearch) AGAINST('detail') ) AND r.regionPage LIKE '/%' ORDER BY score DESC LIMIT 0, 1000 [nil] SELECT SQL_CALC_FOUND_ROWS DISTINCT 'PerchContent_SearchHandler' AS source, 0-(LENGTH(r.regionPage)-LENGTH(REPLACE(r.regionPage, '/', ''))) AS score, r.regionPage AS col1, ci.itemSearch AS col2, ci.itemJSON AS col3, r.regionOptions AS col4, p.pageNavText AS col5, p.pageTitle AS col6, regionTemplate AS col7, r.regionKey AS col8 FROM perch2_content_regions r, perch2_content_items ci, perch2_pages p WHERE r.regionID=ci.regionID AND r.regionRev=ci.itemRev AND r.pageID=p.pageID AND r.regionPage!='*' AND r.regionSearchable=1 AND ci.itemSearch REGEXP '[[:<:]]detail[[:>:]]' AND r.regionPage LIKE '/%' ORDER BY score ASC LIMIT 0, 1000 [0] SELECT FOUND_ROWS() AS count Using template: /templates/search/search-result.html Using template: /templates/search/search-form.html Array ( [type] => 2 [message] => include(): Failed opening '/var/sentora/hostdata/nickoakley/public_html/nickoakleyphotography_com/perch/config/runway.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') [file] => /var/sentora/hostdata/nickoakley/public_html/nickoakleyphotography_com/perch/core/runway/lib/PerchConfig.class.php [line] => 20 ) ~ ~ ~

Also have just seen this error...

Temp folder is not writable. Check the path to your temp folder in your runway.php file and check permissions are set for PHP to write to it.

Where will I find this or do I have to create one?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Where are you getting that error?

From settings, diagnostics.

Sorry I pasted the wrong code before ...

SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='359dabd4ca2dc871745e45ab6db97306' LIMIT 1
UPDATE perch2_users SET userHash='f7fffe8259d03eddaa832f9eaee6e852' WHERE userID='1'
[45] SELECT p.privKey FROM perch2_user_privileges p
[37] SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID
[1] SELECT collectionID, collectionKey, collectionEditRoles FROM perch2_collections WHERE collectionInAppMenu=1 ORDER BY collectionOrder ASC
Setting alert: Your backup temp folder is not set, or is not writable. (notice)
Queries: 6
Memory: 2.2078
Array
(
    [type] => 2
    [message] => include(): Failed opening '/var/sentora/hostdata/nickoakley/public_html/nickoakleyphotography_com/perch/config/runway.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php')
    [file] => /var/sentora/hostdata/nickoakley/public_html/nickoakleyphotography_com/perch/core/runway/lib/PerchConfig.class.php
    [line] => 20
)
Drew McLellan

Drew McLellan 2638 points
Perch Support

You have a missing file by the looks of things:

perch/config/runway.php

Hi Drew,

I have updated that and I am still getting the error on the diagnostics and the search.php is not picking up the collections.

Not sure if related. For example if you search for Poppy it brings up a result of an older image but not this one https://nickoakleyphotography.com/detail.php/?s=poppy.

Debug Message
[1] SELECT * FROM perch2_pages WHERE pagePath='/search.php' LIMIT 1
Using template: /templates/search/search-form.html
[2] SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='/search.php' OR regionPage='*' ORDER BY regionPage DESC
Search term: poppy
[37] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
[1] SELECT SQL_CALC_FOUND_ROWS DISTINCT 'PerchContent_SearchHandler' AS source, MATCH(ci.itemSearch) AGAINST('poppy') AS score, r.regionPage AS col1, ci.itemSearch AS col2, ci.itemJSON AS col3, r.regionOptions AS col4, p.pageNavText AS col5, p.pageTitle AS col6, regionTemplate AS col7, r.regionKey AS col8 FROM perch2_content_regions r, perch2_content_items ci, perch2_pages p WHERE r.regionID=ci.regionID AND r.regionRev=ci.itemRev AND r.pageID=p.pageID AND r.regionPage!='*' AND r.regionSearchable=1 AND (MATCH(ci.itemSearch) AGAINST('poppy') OR MATCH(ci.itemSearch) AGAINST('poppy') ) AND r.regionPage LIKE '/%' ORDER BY score DESC LIMIT 0, 1000
[1] SELECT FOUND_ROWS() AS `count`
[1] Using template: /templates/search/search-result.html
Using template: /templates/search/search-form.html
Array
(
    [type] => 2
    [message] => include(): Failed opening '/var/sentora/hostdata/nickoakley/public_html/nickoakleyphotography_com/perch/addons/feathers/paypalshop/runtime.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php')
    [file] => /var/sentora/hostdata/nickoakley/public_html/nickoakleyphotography_com/perch/config/feathers.php
    [line] => 3
)
Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you using Feathers?

No I am not.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok. You have something in your PayPal Shop looking for feathers that don't exist.

So if I install feathers will that fix the problem. would this effect the search as well?

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Either install Feathers or remove whatever it is that is calling them.

I have installed feathers but it has not resolved the issue

Debug Message
[1] SELECT * FROM perch2_pages WHERE pagePath='/search.php' LIMIT 1
Using template: /templates/search/search-form.html
[2] SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='/search.php' OR regionPage='*' ORDER BY regionPage DESC
Search term: poppy
[37] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
[1] SELECT SQL_CALC_FOUND_ROWS DISTINCT 'PerchContent_SearchHandler' AS source, MATCH(ci.itemSearch) AGAINST('poppy') AS score, r.regionPage AS col1, ci.itemSearch AS col2, ci.itemJSON AS col3, r.regionOptions AS col4, p.pageNavText AS col5, p.pageTitle AS col6, regionTemplate AS col7, r.regionKey AS col8 FROM perch2_content_regions r, perch2_content_items ci, perch2_pages p WHERE r.regionID=ci.regionID AND r.regionRev=ci.itemRev AND r.pageID=p.pageID AND r.regionPage!='*' AND r.regionSearchable=1 AND (MATCH(ci.itemSearch) AGAINST('poppy') OR MATCH(ci.itemSearch) AGAINST('poppy') ) AND r.regionPage LIKE '/%' ORDER BY score DESC LIMIT 0, 1000
[1] SELECT FOUND_ROWS() AS `count`
[1] Using template: /templates/search/search-result.html
Using template: /templates/search/search-form.html

The search was picking up my images from my list/detail portfolio not the new collections. How do I get it to pick the new ones up?

The search was picking up my images from my list/detail portfolio not the new collections. How do I get it to pick the new ones up?

Drew McLellan

Drew McLellan 2638 points
Perch Support

For your collection, what do you have set in the options under 'Search' ?

 <?php
    $query = perch_get('q');
    perch_content_search($query, array(
       'apps' => array('PerchContent,'),
      'paginate'=> false,
    'count' => 1000,
      ));    ?>
Drew McLellan

Drew McLellan 2638 points
Perch Support

In the control panel, under the collection options, what do you have set for Search?

I have include in search results selected on the collie tion and each individual item.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you set the URL for single items?