TiagoSilvaPereira / vemto-issues

Repository to track Vemto Issues
30 stars 0 forks source link

index page search error with null value #447

Closed 5SMNOONMS5 closed 1 year ago

5SMNOONMS5 commented 1 year ago

Attention: Please use the Discussions page for feature requests or suggestions instead of opening a new issue.

Describe the bug In index page when you search with null value, it appear error , see below

To Reproduce Steps to reproduce the behavior:

  1. Go to index page
  2. Click search button without any keyword

Expected behavior no error

Screenshots Screen Shot 2023-09-15 at 10 11 37 AM

Desktop (please complete the following information):

Additional context This should be discuss about application should be allow search null ( means return all data like you first time visit index page ) or disable button when no text input

irafaelfurtado commented 1 year ago

It's true, I have the same issue. Although it's something simple to solve, it doesn't hurt to give a heads up ;)

TiagoSilvaPereira commented 1 year ago

@5SMNOONMS5 @irafaelfurtado thank you for reporting... soon we'll launch Vemto v2 with this issue already solved

5SMNOONMS5 commented 1 year ago

thx @TiagoSilvaPereira, look forward ur v2 version

Ls6375 commented 1 year ago

This issue is very easy to resolve for the this current version of Vemto, Go to Models > Scopes > Searchable.php, Simply add '?' in the search paramter to allow it to accept null value, in this way, this issues will gonna be sovled.

image

5SMNOONMS5 commented 1 year ago

@Ls6375 thx for reply. but still good for author to know, fix will be nice for every project and all new users.

TiagoSilvaPereira commented 1 year ago

This issue is very easy to resolve for the this current version of Vemto, Go to Models > Scopes > Searchable.php, Simply add '?' in the search paramter to allow it to accept null value, in this way, this issues will gonna be sovled.

image

The problem is that Vemto v1 does not support adding ? character due to some problems in the Template Engine. The fix is coming to v2 with the improved template engine