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

Date/Time field error during Pods Edit on iPad #6318

Closed
lisaschiffli opened this issue Nov 18, 2021 · 16 comments
Closed

Date/Time field error during Pods Edit on iPad #6318

lisaschiffli opened this issue Nov 18, 2021 · 16 comments

Comments

@lisaschiffli
Copy link

Description

When editing new or existing custom pods items (ie Concerts), on iPads (both Safari and Chrome, 2 diff iPads), all Date/Time fields are unavailable for editing and display the error "There was an error rendering the field." This occurs on both existing previously entered date/time entries as well as new entries. It also occurs when a new test date/time field is tried. This occurs on two different websites. My client uses an iPad to enter her data.

This does not occur on Windows 10 (Chrome, Firefox, Edge) or on client's Mac Book. The date/time fields can be edited as expected.

Version

2.8.5

Testing Instructions

  1. Edit an existing custom pod from the Dashboard or Add New. Locate a date/time field.
  2. Field will report error "There was an error rendering the field." next to the label.

Screenshots / Screencast

No response

Possible Workaround

Use a Windows 10 or Mac Book instead of iPad to edit date/time pods fields.

Site Health Information

No response

Pods Package

No response

@JoryHogeveen
Copy link
Member

Hi @lisaschiffli ,

Please share your field config so we can validate/reproduce the issue!
Otherwise it’s very hard for us to debug 🙂

Cheers, Jory

@JoryHogeveen JoryHogeveen added the Status: Need Reproduction Issue must be reproduced before coding can begin label Nov 19, 2021
@JoryHogeveen JoryHogeveen added this to the Pods 2.8.6 milestone Nov 19, 2021
@JoryHogeveen
Copy link
Member

Probably the same issue: #6300

@JoryHogeveen
Copy link
Member

@JoryHogeveen JoryHogeveen removed the Status: Need Reproduction Issue must be reproduced before coding can begin label Nov 26, 2021
@sc0ttkclark
Copy link
Member

@zrothauser This one could use an additional eye from you to verify it's not an issue with our DFV field itself.

I'll do some testing on my iPad to see what I can find out too.

@sc0ttkclark
Copy link
Member

@zrothauser Confirmed, this is definitely happening.

Mobile chrome dev logs show this for every date/time/datetime field in the Kitchen Sink CPT. Not a single one of the fields works at the moment.

ERROR: SyntaxError: Invalid regular expression: invalid group specifier name
WARNING: There was an error rendering this field. SyntaxError: Invalid regular expression: invalid group specifier name [object Object]

@sc0ttkclark
Copy link
Member

This happens on iPadOS (iPad) and iOS (iPhone) on Chrome or Safari, just shows “There was an error rendering the field” message

@sc0ttkclark
Copy link
Member

sc0ttkclark commented Nov 28, 2021

I'm using Local app with a Live Link to test my local site on my Mac using my iPhone / iPad.

From Safari web inspector via cable:

[Warning] There was an error rendering this field. (2) (pods-dfv.min.js, line 1)
SyntaxError: Invalid regular expression: invalid group specifier name
RegExp
Hu — pods-dfv.min.js:1:1146662
ec — pods-dfv.min.js:1:1149864
useMemo — react-dom.min.js:216:443
nc — pods-dfv.min.js:1:1151335
we — react-dom.min.js:84:295
zj — react-dom.min.js:226:499
Th — react-dom.min.js:152:226
tj — react-dom.min.js:152:155
Te — react-dom.min.js:146:154
Ja — react-dom.min.js:224:384
md — react-dom.min.js:173
(anonymous function) — react-dom.min.js:175:225
Rh — react-dom.min.js:147
nd — react-dom.min.js:175:211
init — pods-dfv.min.js:1:1286509
(anonymous function) — pods-dfv.min.js:1:1287056
Object

componentStack: "↵    in nc↵    in Gh↵    in i↵    in div↵    in div↵    in div↵    in zr↵    in wm↵    in wm↵    in WithDispatch(Component)↵    in Unknown…"

Object Prototype

__defineGetter__(propertyName, getterFunction)

__defineSetter__(propertyName, setterFunction)

__lookupGetter__(propertyName)

__lookupSetter__(propertyName)

constructor: function()

hasOwnProperty(propertyName)

isPrototypeOf(property)

propertyIsEnumerable(propertyName)

toLocaleString()

toString()

valueOf()

@jakestpeter
Copy link

I feel like this is broken in Safari but works in Chrome ....

This happens on iPadOS (iPad) and iOS (iPhone) on Chrome or Safari, just shows “There was an error rendering the field” message

@webaissance
Copy link

I can confirm that my clients who use Safari are reporting the Pods date field is broken as of 11/30/2021

@MartvanderKruis
Copy link

Yep still the error. I have this on my macbook as well. Seems it works in Chrome but only happens in all things Safari.

@pdclark
Copy link
Collaborator

pdclark commented Dec 20, 2021

Verified on Safari Desktop version 15.2 — same console error regarding an invalid regex.

@bslickis
Copy link

Error still occurring in running 2.8.8.1. Only occurs on iOS devices, whether running Safari or Chrome. Works fine on Chrone and Explorer on Android and Desktop.

Field configurations for my site:

http://kaylees3.sg-host.com/wp-content/uploads/2022/01/Field-Details.png
http://kaylees3.sg-host.com/wp-content/uploads/2022/01/Date-Time-Options.png
http://kaylees3.sg-host.com/wp-content/uploads/2022/01/Advanced.png
http://kaylees3.sg-host.com/wp-content/uploads/2022/01/REST-API.png

@nobleclem
Copy link

So I ran into this issue today reported by a client and did some investigating. The issue is a result of the crosswalk from PHP dateformat to moment dateformat RegExp.

The issue resides in: ui/js/dfv/src/helpers/dateFormats.js#L99

The regexString being created contains a lookbehind (?<!\\\\) in it and Safari does not yet support lookbehinds.

I am not sure if this is resolving a use case I am unaware of but for it to work in safari it would need to be removed. A quick and simple check does confirm it but without knowing more about the reason for its existence I cannot say it will work without other use case errors popping up.

@mbjmcjohnston
Copy link

Still seeing same issue on Desktop Safari

@sc0ttkclark
Copy link
Member

Fixed in 2.8.9

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

No branches or pull requests