BUG: Newsletter report window is blank
-
Hey. I have used your plugin on a number of installations. However, on one there is a bug. When I click on the link to view a report, the popup window opens but it is blank. The emails have been sent out to the recipients and everything else is working ok. However, the report is blank.
Any idea what is causing this bug and how it might be fixed?
-
I’m having a similar problem, but in my case it show a blank screen with this comment: “Cheatin’ uh?”
This problem only occurs on my live site, but works properly on my staging site.About khunmax issue, it could be the report file inside plugin: double check if the file exists or its permissions.
About BiynDesigns issue, it seems you don’t have the permission to open the report. You can check it in dashboard in Newsletters > Settings > Permissions. Or it could be an issue related to another plugin that manages user roles or security.Thanks for the response, though it has not really helped in solving my problem, I’m logging in as the admin, but for some reason the plugin seems not to recognize me as such. I’ve tried disabling all other plugins, still the problem persist.
However, I think the problem might be, because I change the name of my wp-content directory to some other name. I’ve looked into the .htaccess file to see if the permission is being set there I found nothing. The dashboard Newsletter> Settting> Permissions, shows me as the administrator. So, I’m completely stump!
I’ll gladly pay you to help me look into this, is there an email by which you could be reached?
Thanks for creating such a fabulous newsletter plugin.
Hey
I check all of the report files against a fresh version of your plugin and everything is there. I also opened the php files and doesn’t appear to be any corruption.
I deactivated and deleted, and then reinstalled but problem still there.
Report opens, can see the pop up screen with “Newsletter Report” written at top left of screen, but rest of page is blank (white) with no content.
No error message or anything else. Just no report content.
@biyndesigns: did you set in your wp-config.php these constants?: https://codex.www.ads-software.com/Editing_wp-config.php#Moving_wp-content_folder
@khunmax: you should see some errors in that page. You can try adding
define( 'WP_DEBUG', true );
in your wp-config.php. Otherwise have a look in server error logs.Hey thanks for your reply.
I ran debug in my wp-config.php file and when I opened the report I got the following error:
Fatal error: Call to undefined function alo_em_user_can_edit_newsletter() in /home/MYSITE/public_html/wp-content/plugins/alo-easymail/pages/alo-easymail-admin-report.php on line 26
What is causing the error and how do I fix it?
Thanks for your help.
That function is defined inside this file:
alo-easymail/functions/alo-easymail-newsletters.php
Double check if it exists or it has the permission to be viewable.-
This reply was modified 8 years, 5 months ago by
eventualo.
@eventualo Yes I did. Here is my sample declaration in my wp-config.php:
define( 'WP_CONTENT_DIR', '/server/absolute-path/public_html/new-content' ); define( 'WP_CONTENT_URL', 'https://altchoicetech.com/new-content' );
If that is not the problem, I wonder what could be?
Again thanks for your help!
alo-easymail/functions/alo-easymail-newsletters.php is there.
It has the following permissions:
Read has tick for: User, Group and world
Write has tick for: User But not for Group and World
Execute no ticks
Permission 644alo-eaymail-newsletters.php file has the following php:
<?php if ( !defined('ABSPATH') ) die(); // If this file is called directly, abort. /** * Functions about newsletter queries. * * @package WordPress * @subpackage ALO EasyMail plugin */ /** * User can edit Newsletter */ function alo_em_user_can_edit_newsletter ( $newsletter, $user_id=false ) { global $user_ID; if ( empty( $user_id ) ) $user_id = $user_ID; $user = new WP_User( $user_id ); return $user->has_cap( 'edit_newsletter', $newsletter ); } /** * Get Newsletter by id */ function alo_em_get_newsletter ( $newsletter ) { return get_post ( $newsletter ); } /** * Get Newsletter Status from post meta */ function alo_em_get_newsletter_status ( $newsletter ) { return get_post_meta( $newsletter, '_easymail_status', true ); } /** * Update the Newsletter Status * @param int * @param str */ function alo_em_edit_newsletter_status ( $newsletter, $status ) { delete_post_meta ( $newsletter, "_easymail_status" ); add_post_meta ( $newsletter, "_easymail_status", $status ); } /** * Reset/delete the Newsletter Status */ function alo_em_delete_newsletter_status ( $newsletter ) { delete_post_meta ( $newsletter, "_easymail_status" ); } /** * Check if Newsletter Report of Recipients was archived */ function alo_em_is_newsletter_recipients_archived ( $newsletter ) { if( alo_em_get_newsletter_status ( $newsletter ) != "sent" ) return false; return ( $archive = get_post_meta ( $newsletter, "_easymail_archived_recipients" ) ) ? $archive : false; } /** * Get the Newsletter(s) using 'get_posts' * @param str $status * @param int $limit how many newsletter * @return mixed */ function alo_em_query_newsletters ( $status="sent", $limit=1 ) { global $wpdb, $wp_version; $args = array ( "post_type" => "newsletter", "numberposts" => $limit, "orderby" => "post_date", "order" => "ASC", "post_status" => "publish" ); if ( version_compare ( $wp_version, '3.1', '>=' ) ) { $meta_1 = array( 'key' => '_easymail_status', 'value' => $status, 'compare' => '=' ); $args['meta_query'] = array( $meta_1 ); } else { $args['meta_key'] = '_easymail_status'; $args['meta_value'] = $status; $args['meta_compare'] = '='; } $newsletters = get_posts ( $args ); return $newsletters; } /** * Count Newsletter(s) by status */ function alo_em_count_newsletters_by_status ( $status="sent" ) { return count( alo_em_query_newsletters ( $status, -1 ) ); } /** * Get the Newsletter(s) on top of queue */ function alo_em_get_newsletters_in_queue ( $limit=1 ) { return alo_em_query_newsletters ( "sendable", $limit ); } /** * Get the Newsletter(s) already sent */ function alo_em_get_newsletters_sent ( $limit=1 ) { return alo_em_query_newsletters ( "sent", $limit ); } /** * When the newsletter has been sent, mark it as completed */ function alo_em_set_newsletter_as_completed ( $newsletter ) { global $wpdb; alo_em_edit_newsletter_status ( $newsletter, 'sent' ); add_post_meta ( $newsletter, "_easymail_completed", current_time( 'mysql', 0 ) ); $newsletter_obj = alo_em_get_newsletter ( $newsletter ); do_action ( 'alo_easymail_newsletter_delivered', $newsletter_obj ); } /* EOF */
I am also using the following code in my htacess file:
################### Enable GZIP compression ############################# <IfModule deflate_module> <IfModule filter_module> AddOutputFilterByType DEFLATE text/plain text/html AddOutputFilterByType DEFLATE text/xml application/xml application/xhtml+xml application/xml-dtd AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml image/svg+xml AddOutputFilterByType DEFLATE text/css text/javascript application/javascript application/x-javascript AddOutputFilterByType DEFLATE font/opentype application/font-otf application/x-font-otf AddOutputFilterByType DEFLATE font/truetype application/font-ttf application/x-font-ttf </IfModule> </IfModule> ####################### END GZIP ######################################## ################## DISABLE ET TAG ###################################### Header unset Pragma FileETag None Header unset ETag ################# END DISABLE ET TAG ################################# ##################### LEVERAGE BROWSER CACHING ############################ <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType text/html "access 1 month" ExpiresByType application/pdf "access 1 month" ExpiresByType text/x-javascript "access 1 month" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresByType image/x-icon "access 1 year" ExpiresDefault "access 1 month" </IfModule> #####################END LEVERAGE BROWSER CACHING ########################## #######################REDIRECT TO HTTPS################################# RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} ^MYSITE\.com [NC] RewriteRule ^(.*)$ https://www.MYSITE.com/$1 [R=301,L] ###############################END REDIRECT################################ ####################### BEGIN WordPress ################################## <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> ####################### END WordPress #################################### ########################### RESTRICT ACCESS CODES ############################# # Deny access to all .htaccess files (have not got deny on php.ini file) <files ~ "^.*\.([Hh][Tt][Aa])"> order allow,deny deny from all satisfy all </files> # Deny access to wp-config.php file <files wp-config.php> order allow,deny deny from all </files> # disable directory browsing Options All -Indexes # Restrict Direct Access to Theme PHP files in WordPress RewriteCond %{REQUEST_URI} !^/wp-content/themes/file/to/exclude\.php RewriteCond %{REQUEST_URI} !^/wp-content/themes/directory/to/exclude/ RewriteRule wp-content/themes/(.*\.php)$ - [R=404,L] #Prevent script injections Options +FollowSymLinks RewriteEngine On RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR] RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR] RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2}) RewriteRule ^(.*)$ index.php [F,L] # Block access to wp-includes folder <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^wp-admin/includes/ - [F,L] RewriteRule !^wp-includes/ - [S=3] RewriteRule ^wp-includes/[^/]+\.php$ - [F,L] RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L] RewriteRule ^wp-includes/theme-compat/ - [F,L] </IfModule> # Prevent author username enumeration RewriteCond %{QUERY_STRING} author=d RewriteRule ^ /? [L,R=301] ########################### END RESTRICT ACCESS CODES ################################# ################################# BLOCK URLS ########################################### #block bad url links RewriteEngine On RewriteCond %{HTTP_REFERER} torrent-to-magnet\.com [NC,OR] RewriteCond %{HTTP_REFERER} hvd-store\.com [NC,OR] RewriteCond %{HTTP_REFERER} bizarresexuality\.com [NC,OR] RewriteCond %{HTTP_REFERER} top1-seo-service\.com [NC,OR] RewriteCond %{HTTP_REFERER} burger-imperia\.com [NC,OR] RewriteCond %{HTTP_REFERER} buttons-for-website\.com [NC,OR] RewriteCond %{HTTP_REFERER} 52509916.responsive-test\.net [NC,OR] RewriteCond %{HTTP_REFERER} hundejo\.com [NC] RewriteRule .* - [F] #block bad IP using bandwidth order allow,deny deny from labz.fr deny from marcheebook.com deny from poneytelecom.eu deny from ebookdedemain.com allow from all ############################## END BLOCK URLS #######################################
@khunmax, maybe you can set execute permission to file, so 755.
Then, you can make a test to be sure if there isn’t anything in .htaccess that affects the plugin: temporary comment/delete all the code in .htaccess except the WordPress section, and then try to load the report.@eventualo Do have any suggestion for me on what to do next?
Hey
Tried everything you suggested.
755 and removed all code from .htacess except for WP.
Cleared caching. Viewed across FF, ie, and chrome.
Problem remains exactly same as before. Report opens but just blank white screen.
Where do we go from here?
To both of you: have you already tried disabling all other plugins and use a standard theme? If after that the problem disappears, try to reactivate plugins one by one until you find the conflicting plugin/theme.
I’ve tried that, but still the problem persist. I disabled all the plugin and the theme, then reactivated the ALO EasyMail Newsletter plugin, went and click on the report, got same message of “Cheatin’ uh?”
-
This reply was modified 8 years, 5 months ago by
- The topic ‘BUG: Newsletter report window is blank’ is closed to new replies.