billb101
Forum Replies Created
-
@rizaardiyanto Sorry for not responding sooner. I did try a the Theme Twenty Twenty-One and the problem disappeared. The problem happens with my Theme which is a custom Theme I wrote that uses ACF Pro and Timber. This is the first time I’ve had a problem with a plugin due to my Theme. Suggestions?
PHP Version: 7.4.33
WordPress Version: 6.2.2 (WordPress Multisite, folder based)
PublishPress Blocks Version: 3.1.5
Yes, it only shows up when I have the plugin installed. It appears that the array element
$elements['pages']
is null and that is generating the error in both cases I think. To determine this, with the plugin installed and activated I made the following changes to
wp-includes/post-template.php
First off I added a print_r statement above line 321, i.e., I changed
if ( $elements['page'] > count( $elements['pages'] ) ) { // Give them the highest numbered page that DOES exist. $elements['page'] = count( $elements['pages'] ); }
to
echo '<pre>'.print_r($elements, true).'</pre>'; if ( $elements['page'] > count( $elements['pages'] ) ) { // Give them the highest numbered page that DOES exist. $elements['page'] = count( $elements['pages'] ); }
and got the following output
Array ( [page] => [more] => 1 [preview] => [pages] => [multipage] => )
And for the other error I added a print_r above line 327, i.e., I changed
$content = $elements['pages'][ $page_no - 1 ];
to
echo '<pre>'.print_r($elements, true).'</pre>'; $content = $elements['pages'][ $page_no - 1 ];
and got the following output
Array ( [page] => [more] => 1 [preview] => [pages] => [multipage] => )
My WordPress multisite works fine otherwise and does not generate these errors unless I install and activate the aforementioned plugin. Thank you for your help!
Thanks for getting back to me Peter.
From what you’ve said, having Wordfence > All Options > Scan files outside your WordPress installation turned off would exclude these files from scans.
Unfortunately, this won’t solve my problem. What I’m trying to do is avoid
wordfence-waf.php
being prepended (i.e., included) in non-WordPress PHP pages. Wordfence scanning for malware isn’t an issue for me.Additionally, having your .user.ini with Wordfence’s auto_prepend_file value inside your WordPress installation folder rather than the root folder of your site … Is this the case for you?
I don’t think so. I’m using the configuration outlined here:
My WordPress is installed at the root of my website and controls the root of my website URL. And I have all of the core WordPress files in their own sub-directory under my website document root folder. And in the document root folder is the main WordPress index.php file as well as the .htaccess and .user.ini files that makes everything work. And I have legacy PHP pages and applications installed on the web server as well that aren’t controlled by WordPress (because the rewrite rules in the .htaccess file don’t redirect those URLs to the main WordPress index.php file).
Are you saying that I can move
DOCUMENT_ROOT/.user.ini to DOCUMENT_ROOT/WORDPRESS_FOLDER/.user.ini
Thanks for your help!
Forum: Plugins
In reply to: [WP Super Cache] wp super cache – NFS document rootThank you for your reply! If you don’t mind, could you answer another question: if I use local /tmp/ folders on my two separate web servers, wouldn’t there be a possibility of two different versions of a cached page existing?
Also, regarding the Batcache plugin, it looks like it’s possibly abandoned according to it’s plugin page?
FYI, I ended up using the following in my website’s document root .htaccess file:
<If "%{REQUEST_URI} !~ m#^(/wp/|/index.php)#"> php_value auto_prepend_file none </If>
This is meant to set auto_prepend_file to none for any URL other than the main WordPress index.php or anything under the WordPress wp/ folder. So far it appears to be working.
Forum: Fixing WordPress
In reply to: IP blocking logins via all login methodsI think I figured this out – it does look like you can use XML-RPC to login in addition to wp-login.php.
Thanks @azrobbo – your suggestion turned out to be correct.
I’m able to work around this issue by doing the following:
Settings -> AD Integration -> User tab -> Enable local password changes -> checked
On the Add new user page, I am then presented with form fields for a password and I enter in a password that I don’t plan on sharing with the user as I want them to use their AD login only. It gets me around this issue but I would prefer if I didn’t have to do this.
Forum: Networking WordPress
In reply to: Multisite sub-folder name restrictions – can they be removedWith regards to #1, you can use dashes (-) in a subdomain. I have several subdomains that use a dash (i.e., https://www-site1.example.com), so I don’t see why dashes wouldn’t be allowed. And it seems odd to apply this restriction to sub-folder names if the concern is only for sub-domains.
Anyway, thank you for the info and I’ll take a look at the plugin you mentioned. ??