Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filtering uf-tables with & causes them to stop working #1283

Open
vinc10 opened this issue Jan 24, 2025 · 1 comment
Open

Filtering uf-tables with & causes them to stop working #1283

vinc10 opened this issue Jan 24, 2025 · 1 comment

Comments

@vinc10
Copy link

vinc10 commented Jan 24, 2025

Affected sprinkle or package

userfrosting/theme-adminlte

UserFrosting or package Version

5.1.4

Debug Data

docker compose exec app php bakery debug
WARN[0000] /home/Vincent/git/UF 5 skeleton/UserFrosting/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 

UserFrosting Environnement Information
======================================

 -------------------- ---------------- 
  Framework version    5.1.4           
  OS Name              Linux           
  Main Sprinkle        My Application  
  Main Sprinkle Path   /app/app/       
  Environment mode     default         
  PHP Version          8.2.25          
  Node Version         v18.20.4        
  NPM Version          10.7.0          
 -------------------- ---------------- 


Loaded Sprinkles
================

 ------------------ --------------------------------------- ------------------------------------------------------- 
  Sprinkle           Namespace                               Path                                                   
 ------------------ --------------------------------------- ------------------------------------------------------- 
  Core Sprinkle      UserFrosting\Sprinkle\Core\Core         /app/vendor/userfrosting/sprinkle-core/app/src/../     
  Account Sprinkle   UserFrosting\Sprinkle\Account\Account   /app/vendor/userfrosting/sprinkle-account/app/src/../  
  AdminLTE Theme     UserFrosting\Theme\AdminLTE\AdminLTE    /app/vendor/userfrosting/theme-adminlte/app/src/../    
  Admin Sprinkle     UserFrosting\Sprinkle\Admin\Admin       /app/vendor/userfrosting/sprinkle-admin/app/src/../    
  My Application     UserFrosting\App\MyApp                  /app/app/src/../                                       
 ------------------ --------------------------------------- ------------------------------------------------------- 


Database config
===============

 ------------ -------------- 
  CONNECTION   mysql         
 ------------ -------------- 
  DRIVER       mysql         
  HOST         mysql         
  PORT         3306          
  DATABASE     userfrosting  
  USERNAME     docker        
  PASSWORD     *********     
 ------------ -------------- 


Testing database connection...
==============================

                                                                                                                    
 [OK] Database connection successful

Chat Discussion (optional)

No response

Description

Tested on skeleton 5.1.4 and my custom application running 5.1.4

Filtering tables using some spcial characters, such as &, breaks uf-tables. Follow the steps to reproduce and this error shows up in the console:

query-string.js:48 Uncaught TypeError: Cannot read properties of null (reading 'length')
at Object.deparam (query-string.js:48:30)
at push../node_modules/@userfrosting/theme-adminlte/app/assets/userfrosting/js/uf-table.js.Plugin._cleanHash (uf-table.js:672:1)
at Object.proxy [as sort2Hash_cleanHash] (jquery.js:10615:1)
at Object.cleanHash (widget-sort2Hash.js:202:1)
at String. (widget-sort2Hash.js:227:1)
at Function.each (jquery.js:389:1)
at Object.setHash (widget-sort2Hash.js:226:1)
at HTMLTableElement. (widget-sort2Hash.js:58:1)
at HTMLTableElement.dispatch (jquery.js:5145:1)
at elemData.handle (jquery.js:4949:1)

Steps To Reproduce

1: Go to users page http://localhost:8080/users
2: Enter a & into any column filter
3: Error can be seen in console log. Actions drop down options don't bind to their modals. Table often freezes when in this state.

@lcharette lcharette transferred this issue from userfrosting/sprinkle-admin Jan 25, 2025
@lcharette
Copy link
Member

I can replicate. Moves the issue to the main repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Not Started
Development

No branches or pull requests

2 participants