feedmeastraycat
Forum Replies Created
-
@jkohlbach I can confirm I have this issue as well after changing to HPOS.
I would assume this is something a lot of Swedish stores would be affected by. We have a shipping provider called “PostNord” so orders have a order data called meta_data[_postnord_servicepoint] which contains an object.
The object is basically a bunch of data about the pick up locations the customer selected.
The fix @hotcookie posted above for order_data.php works for me. Would be nice to have an official release with a fix.
You can test to duplicate the issue by just inserting a row or changing a row to contain this value:
O:8:"stdClass":2:{s:3:"foo";s:3:"Bar";s:5:"inner";O:8:"stdClass":1:{s:3:"bar";s:3:"Foo";}}
@nigelrsb I found the issue! The site is a bit older and the options table was still on utf8mb3 for some reason and you guys are sending in an emoji in the notifications data. So when SBI_Notifications->update() runs update_option() it fails (it returns false, but that is never checked in the plugin).
It’s true that there is a cron job fetching the notifications once per week. But there is also a fallback to fetch the notifications on each page load if the cron has failed. And this fallback will run twice if update_option() fails. So when it the notification data contained a emoji, it failed, and it tried again. The cron works fine. But will also fail because of the same issue.
Might be a good idea not to use emojis. Or at least have some error handling when update_option() fails. Maybe set empty data just updating the timestamp so it does not try again.
@spyrosvl Sorry for hijacking your support thread. ?? But maybe you have the same issue!
If anyone else finds this issue and have the same problem it was fixed by changing the table charset, for example:
ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
Remember to backup first!
- This reply was modified 1 week ago by feedmeastraycat.
@nigelrsb I would also like to suggest that you use cache to store the result from https://plugin.smashballoon.com/notifications.json a couple of hours at least. I would say it might be enough to just do it once a day really. How often do you actually update the notifications anyway? ??
According to Query Monitor it does it twice per page load.
Here is some debug information you can send to the developers.
First time it goes (reverse trace):
SBI_Notifications->fetch_feed()
wp-content/plugins/instagram-feed-pro/inc/admin/class-sbi-notifications.php:141SBI_Notifications->update()
wp-content/plugins/instagram-feed-pro/inc/admin/class-sbi-notifications.php:403SBI_Notifications->get()
wp-content/plugins/instagram-feed-pro/inc/admin/class-sbi-notifications.php:332SBI_Notifications->output()
wp-content/plugins/instagram-feed-pro/inc/admin/class-sbi-notifications.php:495do_action('admin_init')
wp-includes/plugin.php:517
And the second time:
SBI_Notifications->fetch_feed()
wp-content/plugins/instagram-feed-pro/inc/admin/class-sbi-notifications.php:141SBI_Notifications->update()
wp-content/plugins/instagram-feed-pro/inc/admin/class-sbi-notifications.php:403SBI_Notifications->get()
wp-content/plugins/instagram-feed-pro/inc/admin/class-sbi-notifications.php:332SBI_Notifications->enqueues()
wp-content/plugins/instagram-feed-pro/inc/admin/class-sbi-notifications.php:427do_action('admin_enqueue_scripts')
wp-includes/plugin.php:517
I have not debugged it further to see if its a simple bug in SBI_Notifications or if the object gets initialized twice.
But yeah, even if that bug is fixed. Calling remote on every page load is a bit excessive. ??
I believe this is fixed with 2.19. Great job.
Forum: Plugins
In reply to: [Cookies and Content Security Policy] Remove jQueryGreat news! I updated the plugin on my “problem” site (where I had WPML cookie issue with regards to the “js in php” thing) and it looks like the problem is gone.
Vanilla js would be a big bonus. But its not a big issue obviously. ??
@jonkastonka Just checking, did you get my email? Let me know if you have time to look at it soon(ish). ??
@jonkastonka Yeah. Strange indeed. I think its just how the plugin loads WP that causes WPML not to do its stuff completely.
If the javascript was loaded fully through WP. For example if you had site.com/?load-cookie-error-message-stuff=1 as the javascript URL. And then used for example the template_redirect action to output the javascript. It might not be an issue.
Im thinking that what ?js/cookies-and-content-security-policy-error-message.php does now is that it boots up WP to some extend. But it does not let everything load up completely.
But this is totally guessing here. I havent tested that far (yet). ??
Im gonna have a look if I can add you as a user to the site where we noticed it.
Forum: Plugins
In reply to: [WP Editor Widget] What will happen to exisiting widgetsSince WordPress have a built in widget with a wysiwyg I decided to not contintue to support the plugin. And with full site editing in the works its hard to say if it will stop working all of a sudden. There might be workaround with stopping the block editor widgets or something, I havent looked into it. I would recommend moving to another solution before it turns into an issue. ??
Black Studio TinyMCE Widget might also be another option.
If you disable the plugin WordPress doesnt know how to output them and they will disappear.
With regards to converting them its hard to say, because it depends on what you want to convert them to.
You can read here about where widgets are stored. Reading the WP Editor Widgets data might not be hard. And then putting them into something else depends on what other solution you want to use.
It might be easier to leave the plugin active and manually move widgets and disable the plugin once its done.
Thanks!
For me it started working (with 2.03) when I unchecked “Allow user to access site without saving settings”.
@jonkastonka Any ETA on that update? And is there some minor hotfix one could apply self to fix it? Or better to downgrade to 2.02?
Forum: Plugins
In reply to: [Cookies and Content Security Policy] Iframe URLs that does not end with “/”@jonkastonka Sorry for the late response here. I just got around to test it and it does seem to work now!
If you wanna see you can look here:
https://swedishcommittee.org/about/vacanciesafghanstaff/There is an frame there which is blocked unless you accept “experience” (or all) cookies.
Tack!
Forum: Plugins
In reply to: [Cookies and Content Security Policy] Iframe URLs that does not end with “/”Tack! ??
Forum: Plugins
In reply to: [Cookies and Content Security Policy] Iframe URLs that does not end with “/”@jonkastonka Thanks!
The URL of the iframe is decided by some js embed code. Its like a widget. I paste a div and a script tag from workbuster and the js creates and loads the iframe.
I did a bunch of tests and wrote a long piece of text here but it boils down to the missing
/
in the iframe src.The JS widget I include creates an iframe where the src is
//x.workbuster.com?_[...]
.The only issue here is the missing “/” in the end before “?”. If I hard code the iframe and add “/” it works.
So this iframe works:
<iframe src="//x.workbuster.com/?_=0.1965608425166907&ref=&language=">
But this does not:
<iframe src="//x.workbuster.com?_=0.1965608425166907&ref=&language=">
Both is approved by Safari by adding
https://x.workbuster.com
as my approved domain. But the second one is not approved by the plugin js so I get the error overlay.- This reply was modified 3 years, 3 months ago by feedmeastraycat.
Forum: Plugins
In reply to: [Cookies and Content Security Policy] Iframe URLs that does not end with “/”Just did this quick and dirty test by removing:
iframeHostname = cookiesAndContentPolicyTrailingSlash(iframeHostname);
and:
domainRule = cookiesAndContentPolicyTrailingSlash(domainRule);
And then changing this:
function cookiesAndContentPolicyGetHostname(url) { if (url) { var m = url.match(/^(?:http:\/\/|www\.|https:\/\/|\/\/)([^\/]+)+/); return m ? m[0].split("?")[0] : null; } }
So it compares without adding a trailing slash and spliting at “?” and removing whatever after for the compare. And that matches fine. And it gives me no browser errors.
But I have to add
https://example.com
as the trusted domain.If I add it with a trailing slash browser approves it but now the js doesnt match and gives me the error overlay again.
Anyway. Not sure this is a patch you want to do though. You might have reasons. ?? But let me know once you have had a look. I have to run with my “allow all domains” hack for a bit. But I dont think we can remove workbuster so I might have to switch cookie plugin if this is not something that can be fixed in the plugin.
/D