thitinan
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: HTML Block problemsThank you for your replies.
IMO, only a mark with ! would be enough to show the errors.
Anyway, I will try checking Custom HTML. Or, waiting if the option to turn off will be available.
Thank you two again.- This reply was modified 4 years, 2 months ago by thitinan.
Thank you for the update.
I enabled the “Invoke Access Denied Redirect”, but the restrict document access returns 404.
The redirect setting which affect the redirect is “404 Redirect” not “Access Denied Redirect”.Thank you,
ThitinanI found out at the file aam-protected-media-files/application/Handler.php:82.
... if ($media->is('restricted')) { http_response_code(401); exit; } else { ...
That line doesn’t read anything or redirect to any rules/settings, but 401 then exit.
Regards,
ThitinanThe below is my .htaccess. The comment is from the version before.
# BEGIN AAM Media Access Control <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} -f # RewriteCond %{REQUEST_URI} \.(jpg|jpeg|png|svg|gif|ico|pdf|doc|docx|ppt|pptx|pps|ppsx|odt|xls|xlsx|psd|zip)$ RewriteCond %{REQUEST_URI} wp-content/uploads/(.*)$ RewriteRule . /index.php?aam-media=1 [L] </IfModule> # END AAM Media Access Control
The settings, I recheck, and reconfig for visitor is
RESTRICTED Restrict direct access to the post. Any attempt to access the post will be denied and redirected based on the Access Denied Redirect rule.
For visitor access denied redirect, I set it to (also re-set it)
Redirected to existing page (select from the drop-down)
That should be enough settings ?
Regards,
ThitinanI tried the AAM6.0.4, and te AMM Protected Media Files.
Some files can be downloaded as visitor.
Some files led to 401.Regards.
ThitinanHi,
Thank you for the response, but I still get the same error after updated to 6.0.3.
The images cannot be viewed as visitors, and the file which is set as not be able to read by visitors got 404.
I couldn’t find any error in the error logs.
Regards.
Thitinan6.0.1 still the problem exists, but a lil bit change.
The image still cannot be viewed as visitor.
The hidden files/redirect files now get 404.- This reply was modified 5 years, 3 months ago by thitinan.
As far as I can share will be below.
Not sure if this is the part or not, but for today it seems like it is.[Wed Nov 20 08:58:55.319455 2019] [fcgid:warn] [pid x:tid y] [client ip:port] mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Class 'AAM_Core_Server' not found in /home/example/example.com/public_html/wp-content/plugins/advanced-access-manager/application/Shared/Manager.php:71, referer: https://example.com/wp-admin/plugins.php [Wed Nov 20 08:58:55.319524 2019] [fcgid:warn] [pid x:tid y] [client ip:port] mod_fcgid: stderr: Stack trace:, referer: https://example.com/wp-admin/plugins.php [Wed Nov 20 08:58:55.319529 2019] [fcgid:warn] [pid x:tid y] [client ip:port] mod_fcgid: stderr: #0 /home/example/example.com/public_html/wp-includes/class-wp-hook.php(286): AAM_Shared_Manager->checkForUpdates(Array, Array, 'https://api.wor...'), referer: https://example.com/wp-admin/plugins.php [Wed Nov 20 08:58:55.319534 2019] [fcgid:warn] [pid x:tid y] [client ip:port] mod_fcgid: stderr: #1 /home/example/example.com/public_html/wp-includes/plugin.php(208): WP_Hook->apply_filters(Array, Array), referer: https://example.com/wp-admin/plugins.php [Wed Nov 20 08:58:55.319539 2019] [fcgid:warn] [pid x:tid y] [client ip:port] mod_fcgid: stderr: #2 /home/example/example.com/public_html/wp-includes/class-http.php(436): apply_filters('http_response', Array, Array, 'https://api.wor...'), referer: https://example.com/wp-admin/plugins.php [Wed Nov 20 08:58:55.319543 2019] [fcgid:warn] [pid x:tid y] [client ip:port] mod_fcgid: stderr: #3 /home/example/example.com/public_html/wp-includes/class-http.php(596): WP_Http->request('https://api.wor...', Array), referer: https://example.com/wp-admin/plugins.php [Wed Nov 20 08:58:55.319548 2019] [fcgid:warn] [pid x:tid y] [client ip:port] mod_fcgid: stderr: #4 /home/example/example.com/public_html/wp-includes/http.php(187): WP_Http->post('https://api.wor...', Array), referer: https://example.com/wp-admin/plugins.php [Wed Nov 20 08:58:55.319553 2019] [fcgid:warn] [pid x:tid y] [client ip:port] mod_fcgid: stderr: #5 /home/example/example.com/public_html/wp-includes/update.php(376): wp_remote_post('https://api.wor...', Array), referer: https://example.com/wp-admin/plugins.php [Wed Nov 20 08:58:55.319557 2019] [fcgid:warn] [pid x:tid y] [client ip:port] mod_fcgid: stderr: #6 /home/example/example.com/public_html/wp-includes/class-wp-hook.php(284): wp_update_plugins(), referer: https://example.com/wp-admin/plugins.php [Wed Nov 20 08:58:55.319564 2019] [fcgid:warn] [pid x:tid y] [client ip:port] mod_fcgid: stderr: #7 / in /home/example/example.com/public_html/wp-content/plugins/advanced-access-manager/application/Shared/Manager.php on line 71, referer: https://example.com/wp-admin/plugins.php
FYI, I was using WP5.2.3, lotta plugins not support 5.3 yet, so I decided to keep that, and also need some test.
After it went failed, I saw only the fail message in the plugin page, but after that in the AAM settings, I didn’t see any error.
If there is any logs file remain, you can name the file, and I’ll try checking on it.
Forum: Developing with WordPress
In reply to: is_user_logged_in() sometimes not workingit appears that even the get_current_user_id, cannot be used from time to time.
Found out it’s the WP Fastest Cache’s problem, can be solved by adding the rules for shop page, and product page.
- This reply was modified 5 years, 3 months ago by thitinan.
Forum: Developing with WordPress
In reply to: is_user_logged_in() sometimes not workingI created the shortcode within the theme function.php (won’t change the theme anyway, self created theme).
The shortcode is called in the page/some part of template which cannot be directly place, or has some place which can affect multiple places at once.
The problem is the last one, if it appears in the theme. The get_current_user_id works fine, but is_user_logged_in doesn’t.That helped.
Thank you so much.
In case some other pages got a problem using width.
jQuery(window).on('load', function(){ if (jQuery('.woocommerce-product-gallery__wrapper div')[0]) { var height = jQuery('.woocommerce-product-gallery__wrapper div')[0].width+2; jQuery('iframe').attr('height',height); } });
In case anyone got the same problem, the modification below will prevent the error.
woocommerce-embed-videos-to-product-image-gallery/woocommerce-embed-videos-product-image-gallery.php: 220
jQuery(window).on('load', function(){
js/woocommerce-embed-videos-to-product-image-gallery/js/photoswipe.js: 1, 2
jQuery(window).on('load', function(){ var height = jQuery('.woocommerce-product-gallery__wrapper div')[0].width+2;
It might not br the best practice to modify the plugin tho, but for the moment, this can’t fix the error.