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

TypeError: _filter_date is not a function #3571

Open
lxregistry opened this issue Feb 13, 2024 · 14 comments
Open

TypeError: _filter_date is not a function #3571

lxregistry opened this issue Feb 13, 2024 · 14 comments
Labels

Comments

@lxregistry
Copy link
Contributor

PHP Version

8.3

Shopware Version

6.6.0.0.RC.2

Expected behaviour

column translated

Actual behaviour

bug-in-shopware

How to reproduce

open in admin area Order/Overview page

@lxregistry lxregistry added the Bug label Feb 13, 2024
@jc-sw-git
Copy link

We weren't able to reproduce this issue, with the given information and would probably require more information on that one. Checked with the currently released 6.6.0.0 RC2

@lxregistry
Copy link
Contributor Author

when I uninstall "Language pack" extension, I receive this:
Screenshot 2024-02-15 101509

something is wrong with this Language pack 4.0

@marcelbrode
Copy link
Contributor

"Shopware is nof defined" sounds more like an instance problem. Can you give further steps to reproduce, it's obviously more than just opening the Overview 🤔

Would be great if you could help us to help you 😄

@lxregistry
Copy link
Contributor Author

"Shopware is nof defined" sounds more like an instance problem. Can you give further steps to reproduce, it's obviously more than just opening the Overview 🤔

Would be great if you could help us to help you 😄

I do not know how to help you to help me :(
Node.js v20.11.1.
php 8.3.3
10.11.6-MariaDB MariaDB Server
sw 6.6.0.0.RC.3
cache deleted
theme files deleted
session deleted
only native shopware extensions, all other extensions I removed

./bin/build-js.sh

@marcelbrode
Copy link
Contributor

marcelbrode commented Feb 21, 2024

So... You do have a fresh installation of Shopware, no plugins installed, install & uninstall languagepack, go into that module and that's it?

Because if that's the case it's probably something on your machine, since I tried it in some versions now and always get a normal, functioning result. 🤔

@rittou
Copy link

rittou commented Feb 22, 2024

_filter_date is not a function
The Twig's date time format function causes error???

@marcelbrode
Copy link
Contributor

marcelbrode commented Feb 22, 2024

Can you answer my question from above? Otherwise debugging will be difficult for us and we wanna finda solution 😄

Was the steps above from me the exact way to reproduce it? Or is there more for you?

@rittou
Copy link

rittou commented Feb 22, 2024

I'm using the trunk, and face same problem with the reporter.
You can try format date time in twig. For example:
{{ item.createdAt| date({hour: '2-digit', minute: '2-digit'}) }}

@marcelbrode
Copy link
Contributor

From this point on, I have to assume my question was answered with "Yes", since I have no other choice.

The next question would be: Where? Where do you want to format date time? Since I still do not know what the problem is, since I can't reproduce your issue with the given information.

Please provide further, precise information. We want to help you, so please help us helping you 🙂

@lxregistry
Copy link
Contributor Author

lxregistry commented Feb 23, 2024

So... You do have a fresh installation of Shopware, no plugins installed, install & uninstall languagepack, go into that module and that's it? That's it?

Because if that's the case it's probably something on your machine, since I tried it in some versions now and always get a normal, functioning result. 🤔

Screenshot 2024-02-23 091557 this is firefox screenshot
yes, only one plugin, tested in windows and linux machine
Screenshot 2024-02-23 093343 this is microsoft edge

@marcelbrode
Copy link
Contributor

marcelbrode commented Feb 23, 2024

Okay, I got the missing Piece!
The Problem of this issue is no date-Filter.

Let me post the steps to reproduce it:

  • Get a clean Shopware Instance
  • Install the Languagepack via First Run Wizard
    • The FRW asks you to swap the Admin language, suggesting US-English for that. You probably all did that. (That's the missing piece)
    • If that happend or you switched your admin language manually, this error can occur
  • When you uninstall the language pack now, the admin language won't switch back. This can happen with every PackLanguage, like NL, as well. But of course with US-English you won't notice this immediatly
  • You have broken state where some information is displayed wrongly. The Table-Headers do not seem to have fallbacks and the date-filter does not have an registered language locale to work with

I created a ticket for that, so that you can follow its progress: NEXT-33996

@lxregistry
Copy link
Contributor Author

everything should be with foreign key in database

@marcelbrode
Copy link
Contributor

That doesn't have anything to do with the database. It's a null-reference of the admins language system. The registered language resources are gone, but the locale is still used. Switching the admin language back to an existing language like GB-English or German does fix the problem.

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

No branches or pull requests

4 participants