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

Set the default dateFormat if it’s empty #2779

Merged
merged 4 commits into from
Mar 14, 2024

Conversation

mikeyarce
Copy link
Member

@mikeyarce mikeyarce commented Feb 24, 2024

Fixes #2739

Changes Proposed in this Pull Request

  • Previously, we were setting a datepicker option if it was empty, but it was causing some issues with showing the dateformat in the editor. Now, this will just set the default in case the default dateFormat is empty.
  • Bonus: also added a fallback for the main Jobs view in case there is no DateFormat

Testing Instructions

  • Settings > General - set the Date Format to Custom, clear out the custom format and save.
  • Go to a Job Listing, make sure you can save an expiry date
  • Refresh to make sure it's still there!
  • Go to the Jobs page and make sure you see the dates in the column view as well.
  • Do the same thing now but select a Date Format of your choosing!

Release Notes

  • Fix: Expiry date not showing up in backend editor.
  • Fix: Add fallback to date format for Jobs view in case it's missing.

Plugin build for 5b318b1
📦 Download plugin zip
▶️ Open in playground

Copy link
Contributor

@thedebian thedebian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we might need to update somewhere all components of WPJM and addons could check, maybe ?

Here, for instance, it's not appearing in the jobs dashboard:

Capture d’écran 2024-02-28 à 09 58 44

On the jobs search page the date appears 👍 :
Capture d’écran 2024-02-28 à 10 00 02

If I update the date format in general settings the date appears properly:

Capture d’écran 2024-02-28 à 10 00 44

@mikeyarce
Copy link
Member Author

Thanks @thedebian - my initial PR was addressing the problem when jQuery UI was missing the format, but now I've expanded that to add a fallback for when the actual get_option( 'date_format' ) is missing in the rest of the plugin 😄

@mikeyarce mikeyarce requested a review from thedebian March 5, 2024 19:01
Copy link
Contributor

@thedebian thedebian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good.
Not a blocker, but if we can put 'F j, Y' in a constant somewhere, it'd probably be better.

@mikeyarce mikeyarce merged commit 03f7745 into trunk Mar 14, 2024
8 of 10 checks passed
@mikeyarce mikeyarce deleted the fix/expiry-date-missing-in-editor branch March 14, 2024 18:39
@ibiza69
Copy link

ibiza69 commented Mar 23, 2024

Hello, we updated the plugin with the patch provided on github and it completely broke our website, both the front and backend, without the possibility of access to both. We have had to download the original plugin (not the one patched at github), version 2.2.2 from WordPress and upload it via FTP, overwriting the files, in order to solve the problem.

@mikeyarce
Copy link
Member Author

Hi @ibiza69 - did you just download the source or did you also run the build steps? The safest bet would be to wait till we have a release and test that!

@ibiza69
Copy link

ibiza69 commented Apr 3, 2024

Hi @mikeyarce, we downloaded thru github the fix and uploaded the files thru FTP and that crashed our site.

We shall wait untill plugin update at wordpress :) Thank you.

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

Successfully merging this pull request may close these issues.

Job Listing Expiry Date not working in editor
4 participants