Advanced date picker custom field disappeared in checkout

  • Posts: 40
  • Thank you received: 2
2 years 3 months ago #343877

-- HikaShop version -- : 4.6.1
-- Joomla version -- : 3.9.28

As far as I know I haven't changed anything and all of the sudden my advanced date picker custom field isn't shown anymore during checkout. It shows the title, but no date selector.

I've checked the custom field settings and I can't find anything there. I also found one other forum post which could maybe be related
www.hikashop.com/forum/checkout/903793-a...ker-not-working.html

Edit 1:
I found an error in the javascript console, but can't solve the problem. I added a screenshot.

Edit 2:
I've found where this error came from and temporarily solved it. A few weeks ago I did a security scan for our website and it gave me a few tips for improving security. One of those was to implement CSP. So I've added the following line to my .htaccess file to enable this and now I've found that this stopped the datepicker from working. It must've been this way for weeks and we've just not noticed it.

Header set Content-Security-Policy "default-src 'unsafe-inline' https: 'self' data:; upgrade-insecure-requests; frame-ancestors 'self'"

I think it is good practice to have this enabled? Can I do something to make this work together with my datepicker?

Last edit: 2 years 3 months ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
2 years 3 months ago #343884

Hello,

Did you try to (as described in your topic link) to re-save your custom field to see if that help ?
Did you process recently an update (Joomla, HikaShop or Php) or add a new component or a plugin ?

If the problem is still there and the answers to my questions are all negative, then provide us an url link where wa can "see" your custom field (basically if we understood you well, where we will see only the label).

Awaiting your returns to progress on your subject.
Regards

Last edit: 2 years 3 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 40
  • Thank you received: 2
2 years 3 months ago #343901

That's strange. I completely missed your reply when I edited the original message.

I found where the problem came from, but still have a question about security.

Last edit: 2 years 3 months ago by Dijkshoorn.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 3 months ago #343903

Hi,

I'm not a specialist of CSP rules.
I looked a bit online and it is not recommanded to use unsafe-inline along with frame-ancestors :
content-security-policy.com/unsafe-inline/
So I'm not sure this CSP rule is a good idea.
Tweaking the CSP rules of Joomla seems risky as many extensions add javascript to pages in different ways so changing the rules to something else than what joomla allows by default risks triggering issues like this as this is normally fine.

Please Log in or Create an account to join the conversation.

  • Posts: 40
  • Thank you received: 2
2 years 3 months ago #343928

Thanks Nicolas. I'll leave it for now.

Another thing. I want to remove the screenshots, but it wont let me. When I click "remove" or "remove all" it doesn't do anything.

Last edit: 2 years 3 months ago by Dijkshoorn.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 3 months ago #343929

I've removed them.

Please Log in or Create an account to join the conversation.

Time to create page: 0.071 seconds
Powered by Kunena Forum