Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-82

Issues with "Like" type Grid Filters in Admin

    XMLWordPrintable

    Details

    • Type: Bug Report
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.0.0
    • Fix Version/s: 5.0.2-B1
    • Component/s: Database
    • Labels:
      None

      Description

      Currently LIKE type Admin Grid Filters won't properly work when we use " _ " or " % " in the search query. Both will be treated as "wildcards" by MySQL since not properly escaped.

      Below is example of SQL used when we put " % " in Filter Search:

      SELECT COUNT AS count
      FROM News
      LEFT JOIN CategoryItems ON CategoryItems.ItemResourceId = News.ResourceId
      LEFT JOIN Category ON Category.CategoryId = CategoryItems.CategoryId
      LEFT JOIN Images img ON img.ResourceId = News.ResourceId AND img.DefaultImg = 1
      LEFT JOIN PermCache perm ON perm.CategoryId = CategoryItems.CategoryId
      LEFT JOIN PortalUser u ON News.CreatedById = u.PortalUserId
      LEFT JOIN NewsCustomData cust ON News.ResourceId = cust.ResourceId
      WHERE ((PrimaryCat = 1) AND (perm.PermId = 1)) AND (((`News`.`Title` LIKE "%%%")))
      LIMIT 0,1

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                dmitry Dmitry Andrejev [Intechnic]
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: