Admin search shows duplicate categories

Please report bugs here!

Moderator: Thorsten

Post Reply
dcgibs
Posts: 10
Joined: Mon Jun 26, 2006 8:41 pm
Location: St. Louis, Missouri

Admin search shows duplicate categories

Post by dcgibs »

when a search is done on edit records on the backend site, duplicate categories are shown.

Code: Select all

!--<a name="cat_11" />--><div class="categorylisting"><a href="#cat_11" onclick="showhideCategory('category_11');"><img src="../images/more.gif" width="11" height="11" alt="" /> Autosys</a></div>
    <div id="category_11" class="categorybox" style="display: none;">
    <table class="listrecords">
and two records down is the same code...

Code: Select all

<!--<a name="cat_11" />--><div class="categorylisting"><a href="#cat_11" onclick="showhideCategory('category_11');"><img src="../images/more.gif" width="11" height="11" alt="" /> Autosys</a></div>
    <div id="category_11" class="categorybox" style="display: none;">
    <table class="listrecords">
I just upgraded to phpmyfaq 1.6.3
Thorsten
Posts: 15723
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

which database do you use? I cannot reproduce that.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
dcgibs
Posts: 10
Joined: Mon Jun 26, 2006 8:41 pm
Location: St. Louis, Missouri

Post by dcgibs »

Code: Select all

$DB["type"] = 'mysql';
System Information
phpMyFAQ Version
phpMyFAQ 1.6.3
Server Software
Apache/2.0.54 (Unix) mod_ssl/2.0.54 OpenSSL/0.9.7g PHP/5.0.4 DAV/2 mod_perl/1.999.21 Perl/v5.8.6
PHP Version
PHP 5.0.4
Register Globals
on
Safe Mode
off
Database Client Version
4.1.12
Database Server Version
4.1.12
Webserver Interface
APACHE2HANDLER
Thorsten
Posts: 15723
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

okay, I will check it!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

Hi dcgibs,
could you confirm that your issue appears when searching for a text and not viewing the plain list?
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
dcgibs
Posts: 10
Joined: Mon Jun 26, 2006 8:41 pm
Location: St. Louis, Missouri

Post by dcgibs »

sure thing. I am in the admin backend in edit records. In the search bar i will search for prod. below is the code it produces with a duplicate of Autosys category. And when clicking on the second Autosys, it unhides/hides the first Autosys. I can also see in the source code that there are records in the second Autosys that are not in the first autosys but since clicking on the second Autosys cateogory unhides/hides the first Autosys category, i can't see these records.

Code: Select all

...
<br />
    <input type="submit" name="submit" value="Go" class="submit" />
    </form>
</div></div>
<div id="bodyText">
<h2>Administration of Records</h2>    <form action="/docDB/admin/index.php?uin=4b1432296b0e2ec210ce4187a938d711&aktion=view" method="post">
    <fieldset>
    <legend>search</legend>
        <label class="left">Keyword:</label>
        <input type="text" name="suchbegriff" size="35" value="prod"/>&nbsp;<input class="submit" type="submit" name="submit" value="search" />
    </fieldset>

    <fieldset>
    <legend>Edit Records</legend>

    <!--<a name="cat_11" />--><div class="categorylisting"><a href="#cat_11" onclick="showhideCategory('category_11');"><img src="../images/more.gif" width="11" height="11" alt="" /> Autosys</a></div>
    <div id="category_11" class="categorybox" style="display: none;">
    <table class="listrecords">
    <tbody>
    <tr>
        <td class="list" style="width: 24px; text-align: right;">249</td>
        <td class="list" style="width: 16px;">en</td>
        <td class="list"><a href="/docDB/admin/index.php?uin=4b1432296b0e2ec210ce4187a938d711&aktion=editentry&id=249&lang=en" title="edit 'Jobs fail on step 00 '">Jobs fail on step 00 </a>
</td>
        <td class="list" width="17"><a href="/docDB/admin/index.php?uin=4b1432296b0e2ec210ce4187a938d711&aktion=saveentry&id=249&language=en&submit[0]=delete" title="delete 'Jobs fail on step 00 '"><img src="images/delete.gif" width="17" height="18" alt="delete" /></a></td>
    </tr>
    <tr>
        <td class="list" style="width: 24px; text-align: right;">250</td>
        <td class="list" style="width: 16px;">en</td>
        <td class="list"><a href="/docDB/admin/index.php?uin=4b1432296b0e2ec210ce4187a938d711&aktion=editentry&id=250&lang=en" title="edit 'Jobs going slow '">Jobs going slow </a>
</td>
        <td class="list" width="17"><a href="/docDB/admin/index.php?uin=4b1432296b0e2ec210ce4187a938d711&aktion=saveentry&id=250&language=en&submit[0]=delete" title="delete 'Jobs going slow '"><img src="images/delete.gif" width="17" height="18" alt="delete" /></a></td>
    </tr>
    <tr>
        <td class="list" style="width: 24px; text-align: right;">259</td>
        <td class="list" style="width: 16px;">en</td>
        <td class="list"><a href="/docDB/admin/index.php?uin=4b1432296b0e2ec210ce4187a938d711&aktion=editentry&id=259&lang=en" title="edit 'Troubleshooting tip's '">Troubleshooting tip's </a>
</td>
        <td class="list" width="17"><a href="/docDB/admin/index.php?uin=4b1432296b0e2ec210ce4187a938d711&aktion=saveentry&id=259&language=en&submit[0]=delete" title="delete 'Troubleshooting tip's '"><img src="images/delete.gif" width="17" height="18" alt="delete" /></a></td>
    </tr>
    </table>
    </div>
    <!--<a name="cat_14" />--><div class="categorylisting"><a href="#cat_14" onclick="showhideCategory('category_14');"><img src="../images/more.gif" width="11" height="11" alt="" /> Linux</a></div>
    <div id="category_14" class="categorybox" style="display: none;">
    <table class="listrecords">
    <tbody>
    <tr>
        <td class="list" style="width: 24px; text-align: right;">86</td>
        <td class="list" style="width: 16px;">en</td>
        <td class="list"><a href="/docDB/admin/index.php?uin=4b1432296b0e2ec210ce4187a938d711&aktion=editentry&id=86&lang=en" title="edit 'Installing NetBackup client on Linux'">Installing NetBackup client on Linux</a>
</td>
        <td class="list" width="17"><a href="/docDB/admin/index.php?uin=4b1432296b0e2ec210ce4187a938d711&aktion=saveentry&id=86&language=en&submit[0]=delete" title="delete 'Installing NetBackup client on Linux'"><img src="images/delete.gif" width="17" height="18" alt="delete" /></a></td>
    </tr>
    <tr>
        <td class="list" style="width: 24px; text-align: right;">91</td>
        <td class="list" style="width: 16px;">en</td>
        <td class="list"><a href="/docDB/admin/index.php?uin=4b1432296b0e2ec210ce4187a938d711&aktion=editentry&id=91&lang=en" title="edit 'Common LVM procedures on Linux'">Common LVM procedures on Linux</a>
</td>
        <td class="list" width="17"><a href="/docDB/admin/index.php?uin=4b1432296b0e2ec210ce4187a938d711&aktion=saveentry&id=91&language=en&submit[0]=delete" title="delete 'Common LVM procedures on Linux'"><img src="images/delete.gif" width="17" height="18" alt="delete" /></a></td>
    </tr>
    </table>
    </div>
    <!--<a name="cat_11" />--><div class="categorylisting"><a href="#cat_11" onclick="showhideCategory('category_11');"><img src="../images/more.gif" width="11" height="11" alt="" /> Autosys</a></div>
    <div id="category_11" class="categorybox" style="display: none;">
    <table class="listrecords">
    <tbody>
    <tr>
        <td class="list" style="width: 24px; text-align: right;">179</td>
        <td class="list" style="width: 16px;">en</td>
        <td class="list"><a href="/docDB/admin/index.php?uin=4b1432296b0e2ec210ce4187a938d711&aktion=editentry&id=179&lang=en" title="edit 'Installing Autosys 4.5'">Installing Autosys 4.5</a>
</td>
        <td class="list" width="17"><a href="/docDB/admin/index.php?uin=4b1432296b0e2ec210ce4187a938d711&aktion=saveentry&id=179&language=en&submit[0]=delete" title="delete 'Installing Autosys 4.5'"><img src="images/delete.gif" width="17" height="18" alt="delete" /></a></td>
    </tr>
    <tr>
        <td class="list" style="width: 24px; text-align: right;">164</td>
        <td class="list" style="width: 16px;">en</td>
        <td class="list"><a href="/docDB/admin/index.php?uin=4b1432296b0e2ec210ce4187a938d711&aktion=editentry&id=164&lang=en" title="edit 'Autosys Error: Couldn't connect with Server: anyone@this_place tsdw.server_name.com'">Autosys Error: Couldn't connect with Server: anyone@stps00 tsdw.server_name.com</a>
</td>
        <td class="list" width="17"><a href="/docDB/admin/index.php?uin=4b1432296b0e2ec210ce4187a938d711&aktion=saveentry&id=164&language=en&submit[0]=delete" title="delete 'Autosys Error: Couldn't connect with Server: anyone@stps00 tsdw.server_name.com'"><img src="images/delete.gif" width="17" height="18" alt="delete" /></a></td>
    </tr>
    <tr>
        <td class="list" style="width: 24px; text-align: right;">167</td>
        <td class="list" style="width: 16px;">en</td>
        <td class="list"><a href="/docDB/admin/index.php?uin=4b1432296b0e2ec210ce4187a938d711&aktion=editentry&id=167&lang=en" title="edit 'Autosys file locked: More than one program accessing same file at the same time.'">Autosys file locked: More than one program accessing same file at the same time.</a>
</td>
        <td class="list" width="17"><a href="/docDB/admin/index.php?uin=4b1432296b0e2ec210ce4187a938d711&aktion=saveentry&id=167&language=en&submit[0]=delete" title="delete 'Autosys file locked: More than one program accessing same file at the same time.'"><img src="images/delete.gif" width="17" height="18" alt="delete" /></a></td>
    </tr>
    <tr>
        <td class="list" style="width: 24px; text-align: right;">170</td>
        <td class="list" style="width: 16px;">en</td>
        <td class="list"><a href="/docDB/admin/index.php?uin=4b1432296b0e2ec210ce4187a938d711&aktion=editentry&id=170&lang=en" title="edit 'Change Autosys instance from Hrdevl to Stps00'">Change Autosys instance from Hrdevl to Stps00</a>
</td>
        <td class="list" width="17"><a href="/docDB/admin/index.php?uin=4b1432296b0e2ec210ce4187a938d711&aktion=saveentry&id=170&language=en&submit[0]=delete" title="delete 'Change Autosys instance from Hrdevl to Stps00'"><img src="images/delete.gif" width="17" height="18" alt="delete" /></a></td>
    </tr>
    </table>
    </div>
    <!--<a name="cat_386534" />--><div class="categorylisting"><a href="#cat_386534" onclick="showhideCategory('category_386534');"><img src="../images/more.gif" width="11" height="11" alt="" /> ITO</a></div>
    <div id="category_386534" class="categorybox" style="display: none;">
    <table class="listrecords">
    <tbody>
    <tr>
        <td class="list" style="width: 24px; text-align: right;">292</td>
        <td class="list" style="width: 16px;">en</td>
        <td class="list"><a href="/docDB/admin/index.php?uin=4b1432296b0e2ec210ce4187a938d711&aktion=editentry&id=292&lang=en" title="edit 'Version 4.01 to 5 Upgrade Plan'">Version 4.01 to 5 Upgrade Plan</a>
</td>
        <td class="list" width="17"><a href="/docDB/admin/index.php?uin=4b1432296b0e2ec210ce4187a938d711&aktion=saveentry&id=292&language=en&submit[0]=delete" title="delete 'Version 4.01 to 5 Upgrade Plan'"><img src="images/delete.gif" width="17" height="18" alt="delete" /></a></td>
    </tr>
    </table>
    </div>
    <!--<a name="cat_386540" />--><div class="categorylisting"><a href="#cat_386540" onclick="showhideCategory('category_386540');"><img src="../images/more.gif" width="11" height="11" alt="" /> Other</a></div>
    <div id="category_386540" class="categorybox" style="display: none;">
    <table class="listrecords">
    <tbody>
    <tr>
        <td class="list" style="width: 24px; text-align: right;">356</td>
        <td class="list" style="width: 16px;">en</td>
        <td class="list"><a href="/docDB/admin/index.php?uin=4b1432296b0e2ec210ce4187a938d711&aktion=editentry&id=356&lang=en" title="edit 'Dave R's Documentation '">Dave R's Documentation </a>
</td>
        <td class="list" width="17"><a href="/docDB/admin/index.php?uin=4b1432296b0e2ec210ce4187a938d711&aktion=saveentry&id=356&language=en&submit[0]=delete" title="delete 'Dave R's Documentation '"><img src="images/delete.gif" width="17" height="18" alt="delete" /></a></td>
    </tr>
    <tr>
        <td class="list" style="width: 24px; text-align: right;">357</td>
        <td class="list" style="width: 16px;">en</td>
        <td class="list"><a href="/docDB/admin/index.php?uin=4b1432296b0e2ec210ce4187a938d711&aktion=editentry&id=357&lang=en" title="edit 'Dave R's Process Doc '">Dave R's Process Doc </a>
</td>
        <td class="list" width="17"><a href="/docDB/admin/index.php?uin=4b1432296b0e2ec210ce4187a938d711&aktion=saveentry&id=357&language=en&submit[0]=delete" title="delete 'Dave R's Process Doc '"><img src="images/delete.gif" width="17" height="18" alt="delete" /></a></td>
    </tr>
    </tbody>
    </table>
    </div>
    </fieldset>
    </form>
</div>
...
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

Hi dcgibs,
OK, I was able to replicate your issue only when searching a faq.
The fix is already into CVS: you'll be able to easily access to it using the nightly built snapshot and replacing these files below from your current code (please, backup them first!):
  • admin/record.show.php;
  • inc/ibm_db2.php;
  • inc/maxdb.php;
  • inc/mssql.php;
  • inc/mysqli.php;
  • inc/mysql.php;
  • inc/pgsql.php;
  • inc/sybase.php;
  • inc/sqlite.php;
Just for clarity sake, please note that you're not running PMF 1.6.3 but the code that will be in the PMF 1.6.3 version, when officialy released.

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
Post Reply