Forum for discussing general topics related to Couch.
2 posts Page 1 of 1
in the code below, I am using the article-list.php page to load the pdf's of articles and calling that page to load both the categories and the list. However, when I search by a category, I get "Page Not Found" error. When I don't use the search, the page loads fine. Example is posted here:

http://ocri.cognitionsmartsites.com/inv ... -database/

any thought? thanks

------------------

<cms:template title='Article Database' />

<h1><cms:editable name='title' type='text' /></h1>
<div class="container-fluid white-bg row-offcanvas row-offcanvas-left sidebar-wrap">

<p class="pull-left visible-xs col-xs-12 np mt15"><button type="button" class="btn btn-default btn-xs" data-toggle="offcanvas"><i class="fa fa-navicon"></i> Navigation</button></p><div class="clearfix"></div>
<div class="col-md-3 col-sm-4 col-xs-12 subnav sidebar-offcanvas" id="sidebar" role="navigation">

<div class="list-group">

<p style="font-weight:bold;margin-left:8px;">Article Search</p>
<form style="margin-left:8px;" action="" method="get">
<select style="width:225px;" name="f">
<option value="" selected>--Select A Category--</option>
<cms:folders masterpage='investigator/article-database/article-list.php'>
<option value="<cms:show k_folder_id />"><cms:show k_folder_title /></option>
</cms:folders>
</select>
<br><br>
<p><button type="submit" class="btn btn-primary" id="btnSearch">Search</button></p>
</form>
</div>
</div>

<div class="col-md-6 center-content">
<cms:editable name='main_text' type='richtext' />

<cms:pages masterpage='investigator/article-database/article-list.php' folder=k_folder_name show_future_entries = '1'>
<p><a href="<cms:show pdf />" class="_contentlinks"><cms:show pdf_desc /></a></p>
</cms:pages>

</div>
<cms:embed 'right-bar.php' />
</div>

</div>
</div>
Hi,

The dropdown list in you search form is named 'f'.
So when the form is submitted after selecting a category, the URL called becomes e.g.
http://ocri.cognitionsmartsites.com/inv ... /index.php?f=27

That, if you recall, is how Couch invokes folder-views.

So, the problem is that the search URL is being mistaken by Couch for its canonical folder-view URL. Since, obviously, the folder it thinks is indicated by 'f' is not found, we get the 'not found' error.

As the rectification, please rename the dropdown to something else e.g. 'topic'.

Hope this helps.
2 posts Page 1 of 1
cron