Database error

I just got an email, I have seen a few before but ignored them:

Database error in Adjusters Club Social Network

Query:
SELECT * FROM `bx_ads_entries` WHERE 1 AND `bx_ads_entries`.`status` ='active' AND `bx_ads_entries`.`status_admin` ='active' AND (`bx_ads_entries`.`category_view` LIKE '%Mon%' OR `bx_ads_entries`.`title` LIKE '%Mon%' OR `bx_ads_entries`.`text` LIKE '%Mon%') LIMIT 0, 4

Mysql error:
Unknown column 'bx_ads_entries.category_view' in 'where clause'

Location:
The error was found in getAll function in the file /home/adjuste1/public_html/inc/classes/BxDolSearch.php at line 776.

collation_connection:
utf8mb4_unicode_ci

Debug backtrace:

Array (    [0] => Array        (            [file] => /home/adjuste1/public_html/inc/classes/BxDolDb.php            [line] => 1149            [function] => execute            [class] => PDOStatement            [type] => ->            [args] => Array                (                    [0] =>                 )         )     [1] => Array        (            [file] => /home/adjuste1/public_html/inc/classes/BxDolDb.php            [line] => 1132            [function] => executeStatementException            [class] => BxDolDb            [type] => ->            [args] => Array                (                    [0] => PDOStatement Object                        (                            [queryString] => SELECT * FROM `bx_ads_entries` WHERE 1 AND `bx_ads_entries`.`status` ='active' AND `bx_ads_entries`.`status_admin` ='active' AND (`bx_ads_entries`.`category_view` LIKE  '%Mon%' OR `bx_ads_entries`.`title` LIKE  '%Mon%' OR `bx_ads_entries`.`text` LIKE  '%Mon%') LIMIT 0, 4                        )                     [1] => Array                        (                        )                     [2] =>                 )         )     [2] => Array        (            [file] => /home/adjuste1/public_html/inc/classes/BxDolDb.php            [line] => 499            [function] => executeStatement            [class] => BxDolDb            [type] => ->            [args] => Array                (                    [0] => PDOStatement Object                        (                            [queryString] => SELECT * FROM `bx_ads_entries` WHERE 1 AND `bx_ads_entries`.`status` ='active' AND `bx_ads_entries`.`status_admin` ='active' AND (`bx_ads_entries`.`category_view` LIKE  '%Mon%' OR `bx_ads_entries`.`title` LIKE  '%Mon%' OR `bx_ads_entries`.`text` LIKE  '%Mon%') LIMIT 0, 4                        )                     [1] => Array                        (                        )                     [2] =>                     [3] => 1054                )         )     [3] => Array        (            [file] => /home/adjuste1/public_html/inc/classes/BxDolDb.php            [line] => 371            [function] => res            [class] => BxDolDb            [type] => ->            [args] => Array                (                    [0] => PDOStatement Object                        (                            [queryString] => SELECT * FROM `bx_ads_entries` WHERE 1 AND `bx_ads_entries`.`status` ='active' AND `bx_ads_entries`.`status_admin` ='active' AND (`bx_ads_entries`.`category_view` LIKE  '%Mon%' OR `bx_ads_entries`.`title` LIKE  '%Mon%' OR `bx_ads_entries`.`text` LIKE  '%Mon%') LIMIT 0, 4                        )                     [1] => Array                        (                        )                 )         )     [4] => Array        (            [file] => /home/adjuste1/public_html/inc/classes/BxDolSearch.php            [line] => 776            [function] => getAll            [class] => BxDolDb            [type] => ->            [args] => Array                (                    [0] => PDOStatement Object                        (                            [queryString] => SELECT * FROM `bx_ads_entries` WHERE 1 AND `bx_ads_entries`.`status` ='active' AND `bx_ads_entries`.`status_admin` ='active' AND (`bx_ads_entries`.`category_view` LIKE  '%Mon%' OR `bx_ads_entries`.`title` LIKE  '%Mon%' OR `bx_ads_entries`.`text` LIKE  '%Mon%') LIMIT 0, 4                        )                 )         )     [5] => Array        (            [file] => /home/adjuste1/public_html/inc/classes/BxDolSearch.php            [line] => 760            [function] => getNum            [class] => BxDolSearchResult            [type] => ->            [args] => Array                (                )         )     [6] => Array        (            [file] => /home/adjuste1/public_html/inc/classes/BxDolSearch.php            [line] => 592            [function] => setConditionParams            [class] => BxDolSearchResult            [type] => ->            [args] => Array                (                )         )     [7] => Array        (            [file] => /home/adjuste1/public_html/template/scripts/BxBaseSearchResult.php            [line] => 53            [function] => getSearchData            [class] => BxDolSearchResult            [type] => ->            [args] => Array                (                )         )     [8] => Array        (            [file] => /home/adjuste1/public_html/modules/base/general/classes/BxBaseModGeneralSearchResult.php            [line] => 128            [function] => displayResultBlock            [class] => BxBaseSearchResult            [type] => ->            [args] => Array                (                )         )     [9] => Array        (            [file] => /home/adjuste1/public_html/inc/classes/BxDolSearch.php            [line] => 438            [function] => displayResultBlock            [class] => BxBaseModGeneralSearchResult            [type] => ->            [args] => Array                (                )         )     [10] => Array        (            [file] => /home/adjuste1/public_html/inc/classes/BxDolSearch.php            [line] => 112            [function] => processing            [class] => BxDolSearchResult            [type] => ->            [args] => Array                (                )         )     [11] => Array        (            [file] => /home/adjuste1/public_html/searchKeywordContent.php            [line] => 31            [function] => response            [class] => BxDolSearch            [type] => ->            [args] => Array                (                )         )
)

  • 2231
  • More
Replies (4)
    • Hello AdjustersClub !

      By default, Ads app hasn't 'category_view' field in `bx_ads_entries` table. So you need to specify a way how and what did you change to add it there.

      • Yeah I dealt with the same error. I disabled ads and renabled it, however this also clear it well partially, sometimes there will be a remnant of an old ad. When this happened to me though I was between creating categories and kept deleting and creating new, because I could not decide. How I plan to utilize ads being the list doesnot work l with a collapse tree or anything more condensed at moment, is making data lists and fields for different category sections that are also searchable. Huge undertaking though. So if you did not add anything it probably was doing what I did. I had a ton of categories added and was switching them and adding. Should have maybe cleared cache between.

        • Hello Kyle !

          May you provide us your way of work with categories? Did you use this manual for it https://github.com/unaio/una/wiki/Browseable-categories ?

          • I did not, but I am excited you shared that. I definitely did not follow: Making select field browse-able <<-- Probably was my issue and I am happy to know I can do the Adding block with names and counters That will allow me alot of opportunity. What I get for not checking this wiki.

            Login or Join to comment.