-
Notifications
You must be signed in to change notification settings - Fork 29
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 and Datetime fields do not work for anonymous #203
Comments
Copy them into the add-on? |
Copy what into the addon? The bundle, the pattern or only the registration? |
May we should peel out the pickadate pattern from plone-editor-tools and make it available as a seperate bundle? That's to be done in plone.staticresources. |
I'm open for further splitting of bundles @pbauer remind me at the sprint ;-) |
I meant the pattern, but @thet ‘s idea is much better |
Actually, if the pattern isn’t heavy, why not move it into the non logged in bundle? |
one can always extend the condition for the bundle to something like Depending on the usecase putting "everything" into a bundle doesn't make sense because it adds unnecessary load and therefore slows down the experience. We did that wrong with Plone for too long! |
Is it ok to mention a non core content type? That dredges up the question: why not include EasyForm in Plone buildout.cfg but commented out, as used to be the case with PloneFormGen (maybe in the unified installer) |
Maybe I misunderstood the issue (is it a datepicker problem?) but I just tried on a clean Plone 5.2 buildout with Python 3.7.3: Date and Datetime fields work as expected. |
@davide-targa probably only if you're logged-in, as the pickadate pattern is part of the plone-editor-tools bundle, which itself is only available to logged in users? |
@thet I was not logged-in. |
Check out this public test form for exmple: https://bit.ly/2vOBRGb
|
@davide-targa That's weird. Can you try to do the same for 5.2.1? Maybe it it still worked in 5.2.0. |
@pbauer @davide-targa yes, 5.2.0 is probably the reason why it's working for you. We did the bundle-splitting @ ploneconf in Ferrara, where 5.2.0 was out since some months: plone/plone.staticresources#46 ... not the best semantic versioning scheme for cmfplone here ;) |
I just confirmed this. In Plone 5.2 the date and datetime fields still work for anonymous users. After upgrading to 5.2.1 they stop working. |
+1 same issue |
We had this issue and solved it extending (in our own product ATM) the existing easyform bundle as follows:
If this other solution can work for collective.easyform too we would be happy to create a pull request. |
@parruc have you tried changing the condition for the bundle to check on EasyForm as well? If you want to help other users, you could create a separate bundle for the datepicker in staticresources and extend it's condition in the profile.xml of the EasyForm. So no need to include the datepicker bundle in Easyform as well. |
We did not need to change the condition because we included the mockup-patterns-pickadate needed by EasyForm into the easyform bundle along with other js and css we needed. If the idea here is to move datepicker to its own bundle inside staticresources it makes absolutly sense and I will gladly share the minimal code to do it as soon as possible. |
At least it would allow the datepicker to be enabled through the resource registry without loading the whole logged-in-bundle. @thet what do you think? |
In the meantime I opened a ticket in plone.staticresources: plone/plone.staticresources#96 given that the needed changes are to be done there, ok? |
It's not only date/time fields/pickers that are not working. For instance logged in users see a "Required input is missing." (when blurring a mandatory field, leaving it empty) while logged out users see nothing. |
Just test clean install Plone 5.2.3 the date/time fields/pickers that are not working. |
Also test clean install Plone 5.2.4rc the date/time fields/pickers that are not working. |
5.2.4 by changing the condition of the bundle plone-logged-in in /@@resourceregistry-controlpanel to python: member is not None still not working any idea? |
I have created an add'on that should include the date picker pattern and also inline validation to public views. https://github.com/collective/collective.anonymouseditpatterns It is a first attempt that seems to work for me locally in a plain Plone 5.2.4 coredev plone site. I first tried to get the add'on working in a customer project, but I ran into strange issues of missing resources in the compiling bundle stage. The anonymouseditpatterns imports the pickadate patterns' less code, but in the mockup pattern these imports failed when I added the add'on to a 5.2 coredev checkout, the paths worked again for /bootstrap/ :-S I've tried to reduce the bundle size by adding js stubs, but the pickadate pattern pulls in select2. Maybe it doesn't add more js if I also add pat-select2 to collective.anonymouseditpatterns. |
how about adding a profile to change the condition for that bundle to |
And what happens to the condition for that bundle when it is merged into the meta-bundle? |
imho it's will be merged... @thet ping? we're sprinting tomorrow, as every Wednesday, join us if you need some pointers |
What's the status on this issue? |
@oxygenius I think the status is what you see here on github. Do you have the same problem? Which Plone versions. Did you try collective.anonymouseditpatterns? |
Okay. So the workaround with the anonymouseditpatterns is still the way to go. I'll try collective.anonymouseditpatterns. |
Hi @fredvd, works like a charm! |
In Plone 6 there is still no datepicker for anonymous users. You have to enter the date manually. |
Same here (on 5.2.13). Thank you! 🙌 |
The pickadate-pattern is only part of the of the bundles
plone-editor-tools
andplone-tinymce
which are only available for logged-in users.Is there a way to work around this?
The text was updated successfully, but these errors were encountered: