The WorksForWeb Community Forums
Welcome to the WorksForWeb community forums. Here you can discuss WorksForWeb products with others and contribute to the rapidly growing WorksForWeb community. Please note that while WorksForWeb staff try to maintain presence on the forums, this is not the most reliable way to contact WorksForWeb staff. In case you require a timely response from WorksForWeb on an issue, please open a support ticket here. For pre-sales questions, please open a sales ticket here.

Welcome, Guest. Please login or register.
May 18, 2012, 12:28:35 PM

Login with username, password and session length
Search:     Advanced search
Added the iLister-related Boards

Rate My Site Boards Added

Merged iAuto and iRealty Support Forums together

Several new tips in the Tips and Tricks section
1,604 Posts in 625 Topics by 1,179 Members
Latest Member: bobsteam
* Home Help Search Login Register
+  The iAuto/iRealty/iLister Support Forum
|-+  iAuto and iRealty v.2.x - 3.x
| |-+  General iAuto Discussions
| | |-+  Inconsistent number of listings between website search and admin search
« previous next »
Pages: [1] Print
Author Topic: Inconsistent number of listings between website search and admin search  (Read 4302 times)
highnote
Newbie
*

Karma: 1
Posts: 38


View Profile
« on: May 03, 2007, 11:53:23 PM »

Hello All,

Version: 3.2
I have been working with support to attempt duplication and wanted to see if others could help to duplicate.
This sighting can be duplicated when there are deactivated listings in the database that had not been deleted and there are greater than 20 active listings.

I found this using the trial database when I attempted to "deactivate" all 51 sample listings that came with the installation.  (I did not delete the listings.)  After I deactivated all of the listings I could find, I went back to the front-end of the website and did a search expecting "no ads found," however, 11 listings were displayed. I went back to the admin search and the active ads were not visible from the admin search screen. 

Another side-effect is that each time I deactivate some listings, the total number of listings seems to decrease in the admin search.  After deactivating all active listings viewable, there were only 20 total listings (one page, all deactivated) viewable from the admin search.  Since this is the admin search, the total number of listings should not decrease because the admin search displays both active and deactivated listings.  When I reactivated all of those listings, another page of listings showed up for a total of 40 listings.  I then reactivated the second page of listings, and a 3rd page showed up for a total of 51 listings.

Please see if you can help duplicate this and let us know your results.
Thanks,
Lou

Logged
apn3a
Newbie
*

Karma: 0
Posts: 23


View Profile
« Reply #1 on: May 04, 2007, 09:27:58 AM »

Unfortunately, i reproduced the above bug. I added 20+ listings to the database and they all showed up on the specific search.  Afterwards, I deactivated all of them and I became a little suspicious as only 20 listings were coming up and whichever ones were deactivated, would just disappear.  So I did a search through the website and found that a lot of the deactivated listings were still coming up, 11 to be exact. 

I also noticed that when you hit "Check All" and click "Activate," they don't actually activate.  And I just began to activate all of the inactive listings and the ones that weren't appearing before (the inactive one) began to magically appear.  I was worried that the "Deactivate Expired Listings" tab was not working, but that seems to work.  However, I find it that the "Search & Edit Listings" tab under the "Listing Data Management" is full of bugs.  The functions/actions and results of the Search & Edit Listings needs to be fixed and cleared of its bugs/errors/glitches.

I hope iAuto support figures out a solution to this soon as we cannot launch our website with such critical bugs.
Logged
Smart Girl
Administrator
Full Member
*****

Karma: 5
Posts: 224


View Profile
« Reply #2 on: May 04, 2007, 04:36:35 PM »

We'll fix this, be sure!
Logged

apn3a
Newbie
*

Karma: 0
Posts: 23


View Profile
« Reply #3 on: May 19, 2007, 09:43:26 PM »

has this issue been resolved yet?
Logged
Smart Girl
Administrator
Full Member
*****

Karma: 5
Posts: 224


View Profile
« Reply #4 on: May 23, 2007, 05:09:51 PM »

Yes, we have fixed this issue.

You may find patch here at: http://forum.iautosoftware.com/index.php/topic,174.0.html.
Logged

highnote
Newbie
*

Karma: 1
Posts: 38


View Profile
« Reply #5 on: May 24, 2007, 08:57:35 PM »

After uploading the patch, I still see the problem (perhaps I did not implement the patch properly).  I will describe what I did and the error mode.

Patch installation:
  • Copied the new admin db_search.php into .../classifieds/admin/functions
  • Copied the new unknown.php into .../classifieds/classes
  • Copied the new user db_search.php with into .../classifieds/user/functions
        (note that I modified this file with the recently added unique VIN Check functionality "added by vs")

Using the Import in Admin console, I added some dummy vehicles so that the total number of vehicles is > 30

Defect Replication:
  • Go to the front end of the website and do a Quick Search and just hit "GO"
  • Count the number of Vehicles
  • Go to the admin console - Listing Data Management - Search & Edit Listings - Quick Search and just hit "GO"
  • Count the number of Vehicles

The number of vehicles is still different.  The problem is the Admin query is not displaying all of the vehicles (It stops precisely after displaying the first page of 20)

iAuto support: I have left all of the dummy vehicles in my database for you to duplicate.  Please let me know when I may deactivate these.
Thanks,
Lou
« Last Edit: May 24, 2007, 09:31:59 PM by highnote » Logged
Smart Girl
Administrator
Full Member
*****

Karma: 5
Posts: 224


View Profile
« Reply #6 on: June 05, 2007, 03:33:39 PM »

highnote

Unfortunately, I reproduced the bug.  Sad
We will investigate this issue.
Logged

highnote
Newbie
*

Karma: 1
Posts: 38


View Profile
« Reply #7 on: June 13, 2007, 09:40:20 PM »

Dear iAuto Support,
I noticed you had modified my get_main_pages function on June 6 and it appears to have fixed this problem based on our testing  Grin, but I had not heard back if you are finished testing with my database.  Are you now finished and may I delete the dummy vehicles in the database?

Good work and thanks,
Lou
Logged
Smart Girl
Administrator
Full Member
*****

Karma: 5
Posts: 224


View Profile
« Reply #8 on: June 19, 2007, 05:04:20 PM »

Yes, you may delete them.

Thank you for your kind words!
Logged

apn3a
Newbie
*

Karma: 0
Posts: 23


View Profile
« Reply #9 on: July 05, 2007, 12:02:25 AM »

so has the patch been updated? or is it still the same at http://forum.iautosoftware.com/index.php/topic,174.0.html because i noticed the date on the file says May 23rd.
Logged
highnote
Newbie
*

Karma: 1
Posts: 38


View Profile
« Reply #10 on: July 07, 2007, 02:26:37 AM »

I upgraded to 3.4 and have not seen this latest change in the release.  The change is in the query strings (both were changed) where the new code adds the qualifier 'WHERE active = 0' OR 'active = 1' See the function get_main_pages() from unknown.php below.  They passed a new variable as well and added this variable in the function call from both the regular db_search.php and the db_search.php in the admin directory.

The function call to get_main_pages() in db_search.php must be modified to pass a variable depending on admin or frontend.  For the main db_search.php:
            $pages=get_main_pages($data_array,$num_per_page, "frontend");
The function call in db_search.php of the admin directory is modified as follows:
            $pages = get_main_pages($data_array, $num_per_page, 'admin');

This fixes the issue I had where the admin console did not find all of the listings.  The most recent version of get_main_pages() is below in unknown.php   
Regards,
Lou

-----------------------------------------------------------------------------------------------
function get_main_pages($data_array, $num, $mod)
{
   $formid=$data_array['formid'];
   
   if ($mod == 'frontend')
      $sql='SELECT `id` FROM `main` WHERE active=1';
   else
      $sql='SELECT `id` FROM `main` WHERE active=1 OR active=0';
   
   foreach($data_array['records'] as $recid=>$column) {
      $sql.=sql_request($column);
   }

   if(($r=mysql_query($sql))==false)
   {
      add_error('get_pages','SQL request error.',$sql,mysql_errno().": ".mysql_error());
      return false;
   }

   return ceil(mysql_num_rows($r)/$num);
}


Logged
apn3a
Newbie
*

Karma: 0
Posts: 23


View Profile
« Reply #11 on: July 09, 2007, 06:28:54 AM »

Hey Lou,

Thanks for that, I just changed them all on my copy.

-Minas
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Classified Software by Worksforweb Powered by SMF 1.1.8 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!