Ian McDonald
Forum Replies Created
-
Thanks :). Then this leads on to my real problem, which might just be with my understanding of the libraries.
I tried to call ‘gtag()’ in the Chrome developer tools console on my page, and it wasn’t recognised. I can’t see where you’re incorporating the Google Javascript libraries (which I assume means they’re buried in another library).
Is there a block of Javascript where I can access library functions like ‘gtag()’? Or do you leave them accessible via a particular global object?
My site is https://theVeganOption.org/
Forum: Developing with WordPress
In reply to: Default settings ignored in register_settingsThanks for your help. I tracked this down. A line of documentation had let me to confuse [un]register_setting (Settings API, runtime) with delete_option (Options API, persistent).
Local by Flywheel looks interesting, though I don’t think I’ve got the hardware for it right now.
Forum: Developing with WordPress
In reply to: Equivalent of sprintf for il18n on JavascriptThanks, I should have said that I already knew that part of the answer, but was asking specifically about when there’s a variable in the middle of the translatable string. Obviously, I can just use
replace( target, with, string)
, but was wondering if there’s anything translators are already used to dealing with.Forum: Developing with WordPress
In reply to: How to persist data during the life of a page?Thanks – that’s what I needed to know.
Forum: Developing with WordPress
In reply to: How to get admin/js/accordion.js to work?Yes, I’ve checked the console for JS errors. I based my HTML on the HTML from the trac report for the WP Accordion. I only mentioned jQuery en passant to admit that I could use it if I want to, but I’m not.
Do you happen to know which plugins use the WP accordion (rather than the JQuery accordion or their own). It’s not the kind of thing that goes on the plugin page.
Forum: Plugins
In reply to: [Zotpress] 6.2 Internal Server Error on bib shortcode6.2.1 brought down the whole site, I’m afraid. All pages, including admin pages, threw this error:
Fatal error: Can't use function return value in write context in /home/thevega5/public_html/wp-content/plugins/zotpress/zotpress.php on line 355
I wasn’t able to uninstall it through the admin interface, so I had to just delete the files directly.
Forum: Plugins
In reply to: [Zotpress] 6.2 Internal Server Error on bib shortcodeCorrection: 6.1.6 works for me. Thanks for the advice, @joe-alberts!
Forum: Plugins
In reply to: [Zotpress] 6.2 Internal Server Error on bib shortcodeSure, I’ll be happy to try it. (And send you error logs, if you want to send me one with debugging output turned on, or tell me how to turn it on.)
Forum: Plugins
In reply to: [Zotpress] 6.2 Internal Server Error on bib shortcodeSo you know, I’ve deactivated Zotpress because my CPU share was hitting its limit, and I suspect that Zotpress is why. I’ll be happy to reactivate it again for you to take a look (or if you tell me that’s not a feasible link).
Forum: Plugins
In reply to: [Zotpress] 6.2 Internal Server Error on bib shortcodeReverted to 6.16, and I still get the bug. I did not get the bug when I was on 6.1.6 before.
(Though I’m administering WP via hosting service SiteGround, rather than my own direct install. So if there are any steps required to absolutely ensure that a plugin is fully reverted, such as restarting the server or flushing the server cache, I have not taken them.)
Forum: Plugins
In reply to: [Zotpress] 6.2 Internal Server Error on bib shortcodeI’m afraid changing the style to APA reproduces the bug.
Forum: Plugins
In reply to: [Zotpress] 6.2 Internal Server Error on bib shortcodeWith apologies for the repost if my original comments turn up, this is what reproduces it for me:
WordPress 4.8.1 running Skeptical – WordPress.com theme.
Zotpress v 6.2
PHP v 5.6.31
Browsers: Chrome (logged in as admin) and Opera (not)
Example page (see Bibliography at bottom)
Server log:
[Sat Aug 19 21:18:47.370603 2017] [:warn] [pid 47856] [client 146.198.154.239:50474] Timeout waiting for output from CGI script /home/thevega5/public_html/wp-admin/admin-ajax.php, referer: https://theveganoption.org/wp-admin/plugins.php?plugin_status=all&paged=1&s
Chrome complaints of 500 error on this GET request: LINK (because I can’t post the comment if I put it in a code escape)
And as mentioned, it fails on this shortcode:
[zotpress collection="DV884EHE" style="chicago-author-date" download="no" notes="yes" sortby="author"]
Thanks for making Zotpress, Katie, it’s been really useful. And if there’s more data I can gather to help fix this, please say.
Forum: Plugins
In reply to: [Zotpress] 6.2 Internal Server Error on bib shortcode(I can’t see my previous comment to reply to, so I assume it’s in moderation, but this is the shortcode that reproduces the problem for me:)
[zotpress collection="DV884EHE" style="chicago-author-date" download="no" notes="yes" sortby="author"]
Forum: Plugins
In reply to: [Accept Stripe Payments] “Invalid Stripe Token” thrown when “Price” not setI got impatient and tried the kludge, and it didn’t work. The mismatch is only symptom.
My kludge was to insert the code below into the page, so that the stripehandler hash was found at stripehandler1 as well as stripehandler0. With this the page loaded with no Javascript errors, but pressing the button still took me to the “Checkout-Result” page with an “Invalid Stripe Token” error.
It would be useful to know whether it’s the UID in the HTML, or the Javascript variables, which are wrong.
<script type=’text/javascript’>
/* Kludge because the plugin seems to be starting the input attributes at 1 & the variables at 0. Will break if there is more than one Button on the page. */
/* <![CDATA[ */
var stripehandler1 = stripehandler0;
/* ]]> */
</script>Forum: Plugins
In reply to: [Accept Stripe Payments] “Invalid Stripe Token” thrown when “Price” not setWhat’s the expected behaviour, in terms of (i) the stripeHandlerX javascript static variables, and (ii) the data-stripe-button-uid attribute on the handler? It’s one thing for me to point out that they start counting at stripeHandler0 & data-stripe-button-uid=1, but which one is wrong?
If I’m right, I could kludge a solution by amending the Javascript to subtract one from the uid, but that feels a zillion kinds of wrong. In fact, I could hardcode the uid to be zero, as I only want one box on a page. But still. So very wrong.
But before I even consider kludging it, I’d still like to know I’m fixing the right problem.