GC 3.0.5 Error on list view load: js language file not found

With settings:
‘default_language’ => ‘German’,
‘assets_folder’ => ‘/vendor/grocery-crud/’,
‘environment’ => ‘development’,
‘theme’ => ‘bootstrap-v5’,

Following error in JS-console:

Uncaught (in promise) Error: Cannot find module './de-DE/index.js'
    r groupOptions: {} namespace object:366
    promise callback*r groupOptions: {} namespace object:365
    e search-input-date-time.jsx:27
    Babel 7
    e search-input-date-time.jsx:25
    De search-input-date-time.jsx:37
    zl React
    unstable_runWithPriority scheduler.production.min.js:18
    React 4
    unstable_runWithPriority scheduler.production.min.js:18
    React 4
    Redux 4
    It callback-events.js:5
    Nt external-events.js:7
    Ze persist-middleware.js:6
    e multiple-selections-middleware.js:5
    Xe url-middleware.js:14
    ze server-request-middleware.js:67
    dispatch Redux
    ze server-request-middleware.js:362
    dispatch Redux
    ze server-request-middleware.js:349
    promise callback*u.prototype.then request-base.js:292
    ze server-request-middleware.js:334
    dispatch Redux
    Ze persist-middleware.js:17
    e multiple-selections-middleware.js:5
    Xe url-middleware.js:14
    ze server-request-middleware.js:67
    dispatch Redux
    Ze persist-middleware.js:10
    e multiple-selections-middleware.js:5
    Xe url-middleware.js:14
    ze server-request-middleware.js:67
    Redux 6
    It callback-events.js:5
    Nt external-events.js:7
    Ze persist-middleware.js:6
    e multiple-selections-middleware.js:5
    Xe url-middleware.js:14
    ze server-request-middleware.js:67
    Redux 2
    Mt grocery-crud-loader.js:109
    92 index.js:20
    92 index.js:19
    Webpack 4
2 groupOptions: {} namespace object:366:11

Hello @rrit and thank you for your detailed report. I just fixed it and it is released as part of 3.0.6 :slight_smile:

Please upgrade to the latest version and you will see it working. Don’t forget to copy the assets folder as well :slight_smile:

Hello @johnny,
this error message no longer appears, but… bigger problem is there:
no edit form will be shown. This Form has two date fields with value “30.5.2023, 15:32:50” (as presented in View Form / German notation).
The console error message:

RangeError: Invalid time value
    L index.js:373
    Lt react-datepicker.min.js:1
    It react-datepicker.min.js:1
    Xn react-datepicker.min.js:1
    value react-datepicker.min.js:1
    value react-datepicker.min.js:1
    React 8
    unstable_runWithPriority scheduler.production.min.js:18
    React 5
    e input-date.jsx:44
    Babel 9
    e input-date.jsx:37
    A input-date.jsx:49
    zl React
    unstable_runWithPriority scheduler.production.min.js:18
    React 4
    unstable_runWithPriority scheduler.production.min.js:18
    React 4
    Redux 4
    It callback-events.js:5
    Nt external-events.js:7
    Ze persist-middleware.js:6
    e multiple-selections-middleware.js:5
    Xe url-middleware.js:14
    ze server-request-middleware.js:67
    dispatch Redux
    ze server-request-middleware.js:413
    promise callback*u.prototype.then request-base.js:292
    ze server-request-middleware.js:393
    onEdit datagrid-container.js:129
    onClick actions-column.jsx:58
    onClick group-buttons.jsx:41
    React 11
    unstable_runWithPriority scheduler.production.min.js:18
    React 11
    Mt grocery-crud-loader.js:113
    92 index.js:20
    92 index.js:19
    Webpack 4
react-dom.production.min.js:216:199

with the ‘default_language’ => ‘English’ setting is the same problem.

Hello @rrit ,

I can’t reproduce the issue. Maybe it is data related? Can you please make sure that the data of your database are for example like this?

2023-05-30 15:32:50

Also what type are you using in the database? Are you using datetime?
Is that a mySQL database?

Regards
Johnny

Hello @johnny,

if i comment this fields in $crud->editFields() out, the form work as expected.
The DB is MySQL, field type is “date”.

And I think you’re right, it’s data related: if the fields are NULL, it causes the error.

Best regards

Hello @rrit ,

Ok, thanks for the update. Probably then it is a bug with NULL fields. I will check it and keep you updated on that. For now just to not break please use:

$crud->fieldType('yourField', 'native_datetime');

or:

$crud->fieldType('yourField', 'native_date');

for date only

Hello @johnny,

thank you for workaround tip. I will exclusive define the type of the DB problem fields in the future…

Best regards

Hello @rrit ,

I am still trying to reproduce the issue with no luck. I’ve tried with null and I am not getting any errors. Maybe you are trying to have a field that is not with type date?

Regards
Johnny

Hello @johnny,

heh… my DB-client (DBeaver) show me a wrong value in the field (NULL). Really it is a ‘0000-00-00’ !
Have seen it direct accessed with terminal mysql client.
Now I understand what “RangeError: Invalid time value” mean…

Hello @rrit ,

I’ve fixed the issue on latest version (3.0.7) . Please download and confirm.

Regards
Johnny

Thank you @johnny,

it works now, no errors even if fieldType() not defined.

1 Like