-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
Fixed errors always empty #798
Conversation
replace twitter with X
providing a list of regex meta charscters could cause a false pass for validation
…x/database-queue-callable added object check
[5.X] Add `logging` feature
…t-718-feat/663 Revert "[5.X] Add `logging` feature"
…idator_special_chars Fixed false pass if regex meta chars used
Refactored Redis Cache Driver - Fixed internal cache not always loaded on first cace access - added ability to define “timeout” for for item expiry - - defaults to 1 month. Previous hardcoded value was 10 years - correctly store and unpack int types - fix internal cache not removed if store was flushed - fixed an issue where am imternal cache key would not be updated if it existed, but would be updated in the Redis store
…equirements fix: requirements.txt
…nto fix/redis_cache_issues
Redis has no way to get key ttl enmasse to we oft for an on demand check and update the internal cache as required
@josephmancuso @eaguad1337 This issue may be affecting many devs without them even realising it |
…e_issues Fix/redis cache issues
…_encrypt_opt_out opt-out of encrypt for a cookie
i dont think we can do this because the documentation says to use the bag helper .. and if we modify this to be done right i think it'll be a breaking change |
cookie settings from config
Hi @josephmancuso yeah you are right this would revert to the old behaviour without a MessageBag. I have worked out the issue and am in the process of addressing it. here is what I have so far:
Additionally: Current errors in view behaviour: # file: index.html
...
session errors: {{ session().get('errors') }} {# always returns None #}
<br>
session bag: {{ session().get('bag') }} {# always returns None #}
{# just proving there is no session var called 'bag' #}
<br>
view helper errors() : {# {{ errors().any() }} #} {# throws "errors() is undefined (when uncommented) #}
<br>
view helper bag() : {{ bag().errors() }} {# contains messages expected in errors() var #}
... Expected behaviour: # file: index.html
...
session errors: {{ session().get('errors') }} {# expected to return None, an empty dict or even a MessageBag instance #}
<br>
session bag: {{ session().get('bag') }} {# always returns None #}
{# just proving there is no session var called 'bag' #}
<br>
view helper errors() : {{ errors().any() }} {# Expected value: True #}
<br>
view helper bag() : {# {{ bag().errors() }} #} {# Throws 'bag()' is undefined (qhwn uncommented) #}
... I hope this clarifies things |
session flash now contains errors key as it did previously. The errors are now a MessageBag which aligns the Session with the View helper ‘errors()’
…rrors_always_empty
Not really sure how this has stayed unnoticed for so long.
This fixes the "errors" put into session flash being removed at the beginning of the session and put into a view variable called "bag" for some reason.
The upshot of this is that the examples in the Validation documentation never work and the
ShareErrorsInSessionMiddleware
is always empty as it is loaded AFTER the session is established.Not really sure how to add a test for this.