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

Space character replaced in DHL Express ship time when saving settings. Breaks settings page. #146

Open
peteeveleigh opened this issue Oct 16, 2024 · 1 comment

Comments

@peteeveleigh
Copy link

Describe the bug

I'm sure this is an edge case and may not be worth fixing but I recently had cause to update some settings for Postie.
When I saved the settings the page refreshed with an Exception;
Failed to parse time string (1:00 PM) at position 4 (�): Unexpected character

I dug around and found this to be the Ship Time setting for DHL Express (which we had disabled anyway).

In the database it looks like the space in "1:00 PM" had been replaced with a half-space character.

Editing the value in the DB directly and rebuilding the project config got the settings page to load without a problem until I resaved it again.

Removing the time completely appears to have resolved the issue.

This is happening on Postie 3, but I noticed the same error when working on updating it to Postie 4. I have yet to confirm whether it is the same issue exactly.

Steps to reproduce

  1. Enter a value in the DHL Express ship time field.
  2. Save the settings.

Craft CMS version

Craft Pro 4.12.5

Plugin version

3.1.8 (But noticed same exception with Postie 4)

Multi-site?

No

Additional context

This is happening on local dev using DDEV with PHP 8.1 and MariaDB 10.4.33

Settings are disabled on both our staging and production environments so I can't confirm whether it also happens there.

@engram-design
Copy link
Member

Interesting find! I've seen this only once before where someone's browser locale saved this with a different character, but could replicate that on my end.

Fixed for the next release. To get this early, run composer require verbb/postie:"dev-craft-4 as 4.0.8".

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

No branches or pull requests

2 participants