MichaelApproved
Forum Replies Created
-
Fixed. Thanks so much!
Forum: Plugins
In reply to: [WooCommerce] Template part has been deleted or is unavailable errorI solved this problem for one of my clients. It’s not a WooCommercie issue, it’s an issue with a new WordPress feature called Block themes released in WP v5.9.
Block themes are a new way to create themes and your theme is mistakenly activating this feature. Of course, you’re not using Block themes, you’re using Classic themes, but your theme is mistakenly claiming it’s a Block theme.
Block themes are identified by including a file name
index.htmlin a theme folder calledtemplates.To fix the issue, we need to delete/rename the following file
/wp-content/themes/[YOUR_THEME_FOLDER]/templates/index.htmlIf the
index.htmlfile is empty, it’s probably there to prevent your web server from listing the contents of the directory to the public. You can probably rename the empty file toindex.phpfor the same protection.If it’s not empty, ask a developer to figure out what needs to be done to remove it.
When
index.htmlis no longer in the template folder, WP won’t think your theme is using the Block themes features and use the Classic themes method of finding template parts.- This reply was modified 4 years, 1 month ago by MichaelApproved.
Forum: Plugins
In reply to: [Query Monitor] Logging results to fileThanks! I look forward to the logging feature but will look into the dispatcher feature and see if I can put something together.
I’m getting a slightly different error
Sucuri: (1451906850) Send_log: Connection timed out after 20000 milliseconds. This generally happens when the API service fails to respond in time, you currently have configured the plugin to discard the network connection after 300 seconds. Wait a few minutes until the issue is resolved by itself, or change the timeout limit from the general settings page of the plugin, the option is named “API request timeout”.
Is it related to this issue? If not, I’ll create a different issue.
Also, what is the ETA on getting the dev version released as a regular update?
Thanks!
Forum: Plugins
In reply to: [Bulk Password Reset] Strict Standards errorThanks for the response. I’m using WordPress v4.3
Forum: Plugins
In reply to: Hide Imported Plugin Images from Media LibraryTake a look at this post http://jeffreycarandang.com/tutorials/hide-wordpress-posts-media-uploaded-users/
The code allows you to limit media library results to only the files which the current user has uploaded. You could reverse this code and omit all results from a certain user. If you have your importer plugin associate all the imported images to a certain user account, you can then omit all media assets that were uploaded by that user.
I’m trying to create something like this myself, so I haven’t tested how to reverse the query but I think it’s the right place to look.
If you can’t associate it with just one user_id, you might try associating it to a specific post_id and omit results associated with that post_id.
Forum: Plugins
In reply to: Hide Imported Plugin Images from Media LibraryHave a look at this site http://jeffreycarandang.com/tutorials/hide-wordpress-posts-media-uploaded-users/
The code posted there will restrict the media library results to only images that the current user has uploaded.
For your purposes, you could try and edit the code to omit results of a certain user or some other query parameter.
For example, if your plugin automatically imports with a special user account, you can filter everyone else’s query to omit media library assets that were uploaded by that user.
Forum: Plugins
In reply to: [Redirection] Redirect all versions o a URLI updated the github code and created a pull request with the change being requested. Here it is for anyone browsing the support pages
Forum: Plugins
In reply to: [Redirection] 302 redirect?I’m not the plugin author but I believe you’ll select “Redirect to URL” option, save the redirect and then edit the entry to select the “advanced” option of a 302 redirect. See the screen shot I linked to for more info.
Forum: Plugins
In reply to: [Redirection] Making it easy to redirect without regexI created a pull request on the github repo with this change https://github.com/johngodley/redirection/pull/56
Forum: Plugins
In reply to: [Redirection] Making it easy to redirect without regexTo be clear, I’d filter $url to remove the query values, so I’d never have to worry about that breaking my redirects and leave out regex. This saves the effort of creating a UI.
I could also set the url to be all lowercase, so it’s case insensitive.
Filtering the $url would be really powerful for customizations.
Forum: Plugins
In reply to: [Redirection] Making it easy to redirect without regexAs a quick fix, I can filter the URL and remove the query, trailing slash, making it all lowercase and tweak it any other way I need.
Would you be able to include a filter for the URL in the WordPress init function?
public function init() { $url = $_SERVER['REQUEST_URI']; ////// ////// This is a new filter that I'm proposing ////// $url = apply_filters( 'redirection_url', $url ); // Make sure we don't try and redirect something essential if ( !$this->protected_url( $url ) && $this->matched === false ) { do_action( 'redirection_first', $url, $this ); $redirects = Red_Item::get_for_url( $url, 'wp' ); foreach ( (array)$redirects AS $item ) { if ( $item->matches( $url ) ) { $this->matched = $item; break; } } do_action( 'redirection_last', $url, $this ); } }Forum: Plugins
In reply to: [Redirection] Redirect all versions o a URLI’m struggling with this too. The best I could come up with would be down to 2 requests. One that accounts for the query and one that doesn’t.
You’ll need regex selected for these.
1) Look for /post at the very start of the path. The ^ says match the start.
2) Allow for a / at the end (? = 0 or 1 of the previous character)
3) End of the string (the $ says that we’re done matching)^/post/?$
1) Look for /post at the very start of the path. The ^ says match the start.
2) Allow for a / at the end (? = 0 or 1 of the previous character)
3) A question mark follows. \? is a question mark that is escaped with a backslash, so the regex knows we literally mean a question mark.^/post/?\?
It’d be great to have the option of “ignore query strings” so we could just have the first match.
Forum: Plugins
In reply to: [Query Monitor] Php Fatal errorI can confirm that 2.6.10, in the develop branch, works for me on a WP Engine account that was having this error.
Thanks for making the fix available so fast and for creating this plugin!
Forum: Plugins
In reply to: [Theme My Login] Security hole and bug when trying to reset passwordNot everyone installs TML on a clean installation of WP. Many people, including myself, add TML to existing installations. That leaves the old MD5 style reset key for the user, causing the preg_replace bug. TML resetting passwords is not compatible with older accounts.
I see what you’re saying about clearing the key on password reset. That does sound better. Ideally, the reset key would expire after a few hours/days but that’s a different story.