hughc
Forum Replies Created
-
Forum: Plugins
In reply to: [Gutenberg Block Editor Toolkit – EditorsKit] Filter for custom classes@phpbits my bad, a trailing space in the filter name was all it was. Thanks for trying to help me out.
Forum: Plugins
In reply to: [Gutenberg Block Editor Toolkit – EditorsKit] Filter for custom classesNot getting any love on this either – I’m adding the filter in the functions.php of my theme, but it’s never called.
I was wondering if the function was being registered too late, so I tried to examine the plugin source itself, to establish when the apply_filter() was being called, but I couldn’t see where the parent filter (added in the constructor for
EditorsKit_Custom_CSS_Classes
was being called either, ie:add_filter( 'block_editor_settings', array( $this, 'block_editor_settings' ), 10, 2 );
I’ve read the blog post, and tried your example too, as well as my own code.
https://jeffreycarandang.com/introducing-editorskit-block-styling-utility-classes/
Forum: Plugins
In reply to: [Download Monitor] Gutenberg – fatal error if block is left ’empty’I can see this has already been logged as an issue:
https://github.com/download-monitor/download-monitor/issues/601
Forum: Plugins
In reply to: [WooCommerce] Adding a section to the WooCommerce settings ‘Shipping’ tabThe linked article states:
When creating an extension for WooCommerce, think about where your settings belong before you create them. The key to building a useful product is making it easy to use for the end user, so appropriate setting placement is crucially important.
It’s not clear why this restriction exists?
I’m writing a plugin that assists in backend shipping fulfilment – its options should be a section under the Shipping tab. Instead, my options are to place it as a heading under ‘shipping options’ (where it will be buried), or create a fresh tab (overkill).
Can we please get the linked docs page updated? This statement:
The important thing about the woocommerce_get_sections_products filter, is that the last part products, is the tab you’d like to add a section to. So if you want to add a new tab to accounts section, you would hook into the woocommerce_get_sections_accounts filter.
needs a disclaimer to indicate that
woocommerce_get_sections_shipping
is not a hook that the user should use, as the correspondingwoocommerce_get_setting_shipping
does not get called anywhere except on the shipping options section. Reading the source ofclass-wc-settings-shipping.php
I think I can see why (sections under Shipping are reserved for options registered by different shipping methods?). But the docs should say so.- This reply was modified 6 years, 4 months ago by hughc. Reason: cleaned up language
As an update, I’ve had further grief with the other (font resizer) plugin, turned out the previous dev was conditionally unhooking jquery and hooking a CDN version of it. I had to disable this code in order to get the other plugin running OK. Unsure if that helps at all in your efforts to work out what’s going on.
I’m using 7.1.3 and it’s even harder to find what should be a really simple option.
The dashboard link for ‘manage scan’ does *not* link to the manage_scans subpage. Instead, it goes to:
/wp-admin/admin.php?page=WordfenceScan&subpage=scan_options&source=dashboard
I went round in circles for a similar amount of time as the OP. All I wanted was to manually initiate a scan, something I often do after installing the plugin.
It was only when I madea guess, and manually entered the URL
/wp-admin/admin.php?page=WordfenceScan&subpage=manage_scan&source=dashboard
that I was able to see the manual scan options. There doesn’t seem to be a link to this anywhere in the plugin.
I’ve been long time user of the plugin, and this sort of UX is baffling. In <v7, sure things didn’t look pretty, but they were at least able to be found. Surely it’s a bug?
Thanks for the snippet – I had discovered this independently, and it was leading to a number of emails being sent announcing password resets, because a password was coming out of the database every time a customer object was hydrated on checkout.
Forum: Plugins
In reply to: [The Events Calendar] Illegal string offsets ‘_EventCost’ in event metadataA very similar issue has just cropped up with another client. In this case, it’s a method from the premium plugin causing a fatal error – an examination of the database shows exactly the same issue – until recently it was correctly storing values as serialised arrays, now it’s storing strings…?
[09-May-2017 01:56:12 UTC] PHP Fatal error: Uncaught TypeError: Argument 1 passed to Tribe__Events__Pro__Recurrence__Series_Rules_Factory::build_from() must be of the type array, string given, called in /home/xxxxx/public_html/wp-content/plugins/events-calendar-pro/src/Tribe/Recurrence/Meta.php on line 1056 and defined in /home/xxxxx/public_html/wp-content/plugins/events-calendar-pro/src/Tribe/Recurrence/Series_Rules_Factory.php:32
I’ll be raising a Pro support ticket for this one, but these sort of low-level, fundamental errors, with what looks like corrupted data in the database, are shaking my confidence in the Event Calendar and its Pro variation.
This is on a different host, and different version of PHP and MySQL
WP 4.7.4
EV 4.5.1
EV-Pro 4.4.7
PHP 7.0.18
MySQL 5.6.35Here is what the data looks like in the database:
https://www.dropbox.com/s/aifbxjdswexe3og/sshot-914.png?dl=0
Even if a patch fixes the issue, moving forward, what can I do with data that’s already stored incorrectly in the database?
Hi,
I’m new to the plugin, and I’m not a novice dev, and I’ve struck exactly the same issue, same error message.I’m trying to generate both a popup and trigger button on the fly. The popup is not pre-defined in the popup list (and I couldn’t see anywhere in the docs that this was stated).
Trigger shortcode:
[popup_trigger tag='button' id='new-enquiry']<li><span class="title">9ct</span> - <span class="price">$1,490</span></li>[/popup_trigger]
Popup shortcode:
[popup id="new-enquiry" theme_id="3098"][gravityform title='false' description='false' ajax='true' id='1'][/popup]
rendering these gives me the buttons, as expected, and I can see the popup, with the gravity form inside it, hidden in the DOM.
With no other popups present on the page (apart from the one defined by the shortcode), clicking a trigger button does nothing – assume this is because the relevant JS is not loaded?
If a pre-defined popup is in the DOM, with its ID targeted by the trigger buttons, it works. If it has the same ID as the shortcode generated one, then it shows (not the shortcode one).
But if the button targets the shortcode generated popup only, clicking the button gives the same JS error.
In
site.js
on line 1182:if (settings.mobile_disabled !== undefined && settings.mobile_disabled) {
settings is undefined which means $popup.popmake(‘getSettings’) is returning nothing.
I’m stumped. Unsure if I’m outside the bounds of the plugin content.As an aside, I tried turning on debug, but I get a different console error as the page loads:
`
case “click_open”:
pum_debug.click_trigger(t, o.settings),
console.log(i.label_cookie, o.settings.cookie.name)
}`
cannot read property ‘name’ of undefined
- This reply was modified 7 years, 12 months ago by hughc.
Forum: Plugins
In reply to: [Random Content] nested shortcodes?This question was based on a misunderstanding of how the plugin works – I thought it used multiple enclosing [random_content][/random_content] tags to define the content groups online on the page – understand now that it’s a CPT of its own with full editor (and shortcode) support. Worked a treat for my use case. Feel free to mark resolved.
Forum: Plugins
In reply to: [User Menus - Nav Menu Visibility] breaks AvadaSorry, you’re right – someone else has already installed another plugin doing a similar thing .
Please mark resolved.
Forum: Plugins
In reply to: [User Menus - Nav Menu Visibility] breaks AvadaMenu before plugin activation:
https://www.dropbox.com/s/gcd5plkkewnd6wv/sshot-648.png?dl=0Menu after plugin activation:
https://www.dropbox.com/s/uuveg7mjtvfe946/sshot-649.png?dl=0Menu options for first item, with plugin enabled:
https://www.dropbox.com/s/j3ch2dplrs6g5zn/sshot-650.png?dl=0As mentioned, I haven’t actually started working with the plugin’s options at this point, so my expectation was that the defaults would leave existing menu items untouched, but for some reason with my version of Avada, that’s not the case.
Forum: Plugins
In reply to: [Unsplash WP] XAMPP issues (Windows)I have to stress that, as a fix, it’s pretty nasty hack, as https & peer verification are used for a reason, and disabling it is regarded as a Very Bad Idea, as it leaves you open to MITM attacks etc, but given the small scope here, I guess it’s OK.
I guess my main issue with the choice of tmp directory location it is that, if WordPress is operating in an environment with limited permissions for the web server user (and I’ve occasionally struck this, where restrictive permissions masks are applied, and WordPress / plugins can’t be auto-updated for instance) , the wp-content/uploads/ folder is almost always excluded from these, to allow media uploads to function correctly.
For Windows users, XAMPP is almost always running as the current local user, unless its running as a service, so unless you’ve put XAMPP in the
C:\Program Files\
directory, and then tried to install WordPress under it, you’re unlikely to strike a permissions issue.Perhaps it might pay to rewrite the error message when the test write works, but the real file does not save? People might be chasing their tails otherwise.
Nice plugin by the way! I’m a big fan of Unsplash, it’s great to be able to add some placeholder imagery when I’m comping up layouts, without having to browse / download / upload again.
D’oh, the /wp-admin in the AJAX URL was the giveaway – enabling ‘Use search for admin’ was all that was required for this to work.
I’ve created a minimalist fork over at GitHub to show what this could look like, plus a matching client plugin to post to Slack.
https://github.com/hughc/wordfence-with-notifications
I’m not right up on GitHub manners, should I create an issue / pull request to open a discussion over there? Unsure.
A Slack ‘client’ plugin is here:
https://github.com/hughc/wordfence-slack-notifications