404 Component not found when performing search using embedded sidebar in Joomla

warnett17
warnett17's picture

Joined: 2009-02-16
Posts: 5
Posted: Wed, 2009-02-18 21:57


Gallery version:2.3 core 1.3.0
PHP version:5.1.4 cgi-fcgi
PHPInfo Link (see FAQ):http://www.bcsitedev.com/cooperdev/gallery2/phpinfo.php
Webserver (e.g. Apache 1.3.33):Apache
Database:mysql 4.0.27
Activated toolkits:ArchiveUpload, Thumbnail, SquareThumb, Gd, ImageMagick
Operating system (e.g. Linux):Mac OS 10.4.11
Browser (e.g. Firefox 2.0):Sarafi 3.2.1, Firefox 3.0.6, IE 7

I'm trying to gather predetermined search results to hard code into a jump menu in the "our portfolio" section of the site. When turning on the sidebar (which will eventually be turned off) I enter a search for a known keyword (in my case, "mob") but get a "404 -Component Not Found" error. I'm only guessing this might have something to do with gallery embedded in Joomla but I cannot figure out at all how to make this work.

I appreciate any help... I've been searching online for 9 hours now lol.

The link is: http://www.bcsitedev.com/cooperdev. The Gallery is linked under "our portfolio."

Thanks again!!
Will Arnett

 
coryvdh

Joined: 2010-02-09
Posts: 2
Posted: Tue, 2010-02-09 03:23

Hi Will,

I have this same issue with the search within the embedded sidbar in Joomla. Did you ever fix the problem?

-Cory

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 6138
Posted: Tue, 2010-02-09 03:42

Many gallery generated urls require an $authToken
I once handcoded a gallery search:

G2_init();    
global $gallery;
$session =&$gallery->getSession();
$authToken  = $session->getAuthToken();
echo  <<<EOT
<!-- Start gallery search form -->
        <div style="background-color:#f1f1f1;">
            <form id="SearchScan" action=
            "http://www.yoursite.com/gallery2/main.php" method=
            "post" onsubmit=
                        "return (this.g2_form[searchCriteria].value != '');">
                <div id="gsContent" class="gcBorder1">
                    <input type="hidden" name="g2_returnName"
                    value=""> <input type="hidden" name="g2_return"
                    value=
                    "http://www.yoursite.com/gallery2/main.php?g2_view=search.SearchScan">
                    <input type="hidden" name="g2_formUrl" value=
                    "http://www.yoursite.com/gallery2/main.php?g2_view=search.SearchScan">
                    <input type="hidden" name="g2_authToken" value=
                    "$authToken"> <input type="hidden" name=
                    "g2_controller" value="search.SearchScan">
                    <input type="hidden" name="g2_form[formName]"
                    value="SearchScan"> 
<script type="text/javascript">
// <![CDATA[
function setCheck(val) {
document.getElementById('cb_GalleryCoreSearch_descriptions').checked = val;
document.getElementById('cb_GalleryCoreSearch_keywords').checked = val;
document.getElementById('cb_GalleryCoreSearch_summaries').checked = val;
document.getElementById('cb_GalleryCoreSearch_titles').checked = val;
document.getElementById('cb_comment_comments').checked = val;
document.getElementById('cb_CustomField_customfield').checked = val;
document.getElementById('cb_MultiLang_title').checked = val;
document.getElementById('cb_MultiLang_summary').checked = val;
document.getElementById('cb_MultiLang_description').checked = val;
document.getElementById('cb_tags_tags').checked = val;
}
function invertCheck() {
var o;
o = document.getElementById('cb_GalleryCoreSearch_descriptions'); o.checked = !o.checked;
o = document.getElementById('cb_GalleryCoreSearch_keywords'); o.checked = !o.checked;
o = document.getElementById('cb_GalleryCoreSearch_summaries'); o.checked = !o.checked;
o = document.getElementById('cb_GalleryCoreSearch_titles'); o.checked = !o.checked;
o = document.getElementById('cb_comment_comments'); o.checked = !o.checked;
o = document.getElementById('cb_CustomField_customfield'); o.checked = !o.checked;
o = document.getElementById('cb_MultiLang_title'); o.checked = !o.checked;
o = document.getElementById('cb_MultiLang_summary'); o.checked = !o.checked;
o = document.getElementById('cb_MultiLang_description'); o.checked = !o.checked;
o = document.getElementById('cb_tags_tags'); o.checked = !o.checked;
}
// ]]>
</script>
                     

                    <div class="gbBlock">
                        <input id="gallery-search-textbox" type=
                        "text" name="g2_form[searchCriteria]"
                        maxlength="255" value="Search" title=
                        "Search" onfocus=
                        "if (this.value=='Search')this.value='';"
                        onblur=
                        "if(this.value=='')this.value='Search';">
                        <input type="submit" name=
                        "g2_form[action][search]" value=
                        "Search Media"> 

                        <div style="margin: 0.5em 0">
                            <input type="checkbox" id=
                            "cb_GalleryCoreSearch_descriptions"
                            name=
                            "g2_form[options][GalleryCoreSearch][descriptions]"
                             checked="checked"> <label for=
                            "cb_GalleryCoreSearch_descriptions">Search
                            descriptions</label> <input type=
                            "checkbox" id=
                            "cb_GalleryCoreSearch_keywords" name=
                            "g2_form[options][GalleryCoreSearch][keywords]"
                             checked="checked"> <label for=
                            "cb_GalleryCoreSearch_keywords">Search
                            keywords</label> <input type="checkbox"
                            id="cb_GalleryCoreSearch_summaries"
                            name=
                            "g2_form[options][GalleryCoreSearch][summaries]"
                             checked="checked"> <label for=
                            "cb_GalleryCoreSearch_summaries">Search
                            summaries</label> <input type=
                            "checkbox" id=
                            "cb_GalleryCoreSearch_titles" name=
                            "g2_form[options][GalleryCoreSearch][titles]"
                             checked="checked"> <label for=
                            "cb_GalleryCoreSearch_titles">Search
                            titles</label> <input type="checkbox"
                            id="cb_comment_comments" name=
                            "g2_form[options][comment][comments]"
                            checked="checked"> <label for=
                            "cb_comment_comments">Search
                            comments</label> <input type="checkbox"
                            id="cb_CustomField_customfield" name=
                            "g2_form[options][CustomField][customfield]"
                             checked="checked"> <label for=
                            "cb_CustomField_customfield">Search
                            custom fields</label> <input type=
                            "checkbox" id="cb_MultiLang_title"
                            name=
                            "g2_form[options][MultiLang][title]"
                            checked="checked"> <label for=
                            "cb_MultiLang_title">Search titles
                            (English (UK))</label> <input type=
                            "checkbox" id="cb_MultiLang_summary"
                            name=
                            "g2_form[options][MultiLang][summary]"
                            checked="checked"> <label for=
                            "cb_MultiLang_summary">Search summaries
                            (English (UK))</label> <input type=
                            "checkbox" id=
                            "cb_MultiLang_description" name=
                            "g2_form[options][MultiLang][description]"
                             checked="checked"> <label for=
                            "cb_MultiLang_description">Search
                            descriptions (English (UK))</label>
                            <input type="checkbox" id=
                            "cb_tags_tags" name=
                            "g2_form[options][tags][tags]" checked=
                            "checked"> <label for=
                            "cb_tags_tags">Search Tags</label>
                        </div>

                        <div>
                            <a href="javascript:setCheck(1)">Check
                            All</a>   <a href=
                            "javascript:setCheck(0)">Uncheck
                            All</a>   <a href=
                            "javascript:invertCheck()">Invert</a>
                        </div>
                    </div>
                </div>
            </form>
        </div>
<!-- End gallery search form -->

EOT;

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 6138
Posted: Tue, 2010-02-09 03:44
 
brantaleu

Joined: 2008-03-13
Posts: 36
Posted: Sun, 2010-04-04 20:13

Does anyone have a clue about how to fix this issue? I got the same problem :(