Problems with plugin related tokens

The tokens relating to plugins aren’t working for me.

First, I verified all my plugin licenses, I did the procedure to erase the API license data and activate them again.
I went in Tools->Server and verified they all show as activated and on the latest versions.

I’ve synchronized the site and verified the data is there in the Site profile page. I have a fresh sync from the site.

By all accounts it should be right.

To test this, I place the tokens into the email header and then preview the report. I’ve also tested by generating the PDF download.

Almost none of the plugins related tokens work except for when listing in the plugin section loop.
[plugin.old.version] - shows raw token instead of a value
[plugin.current.version] - shows raw token instead of a value
[plugin.installed.count]
[plugin.edited.count]
[plugin.activated.count] = 1 (there is more than one active plugin, not sure why it’s 1)
[plugin.deactivated.count]
[plugin.deleted.count]
[plugin.updated.count] = 5
[plugin.pending.count]
[plugin.abandoned.count]

Only the updated.count seems to be right. The rest are 0 or showing raw token text.

I know the extensions are on latest version.
No errors or anything in the main PHP log.

I can’t find any example of any of these being used properly because they aren’t in the default templates and I can’t find any online.

I’ve tried to find the code needed to do things like register or process tokens but the docs don’t have anything.

Not sure where to start to figure out how to use tokens when they just don’t show things right.
And how can I change the data or show nothing at all if the token is blank or 0 or something? I would rather not show info at all then have a token show blank data. And in other tokens I might want to display an alternate text like “Couldn’t locate” or whatever I might use.

Hi @zackw

Can you please post the community system report from your MainWP Dashboard for review? The report is located in your Dashboard under Info → Server, on the top right of the page.

Be sure to use the button like the one below; this button hides all your private information:

image

Pressing the button auto-copies the report to your clipboard then just paste it in a reply here.

Also, please include the system report for the Child Site in question by navigating to MainWP Child > System Information and clicking the Blue button.

System report.

### WordPress Check                Required                                               Detected                                     Status   ###

FileSystem Method                  = direct                                               direct                                       Pass        
MultiSite Disabled                 =true                                                  true                                         Pass        
WordPress Memory Limit             >=64M                                                  128M                                         Pass        
WordPress Version                  >=6.2                                                  6.4.2                                        Pass        

### PHP                            Required                                               Detected                                     Status   ###

cURL Extension Enabled             =true                                                  true                                         Pass        
cURL Timeout                       >=300 seconds                                          300                                          Pass        
cURL Version                       >=7.18.1                                               7.68.0                                       Pass        
OpenSSL Version                    >=OpenSSL/1.1.0                                        OpenSSL/1.1.1f                               Pass        
OpenSSL Working Status             Yes                                                    Yes                                          Pass        
PCRE Backtracking Limit            >=10000                                                1000000                                      Pass        
PHP Allow URL fopen                N/A                                                    YES                                                      
PHP Disabled Functions             N/A                                                    , pcntl_alarm, pcntl_async_signals, pcntl_exec, pcntl_fork, pcntl_get_last_error, pcntl_getpriority, pcntl_setpriority, pcntl_signal, pcntl_signal_dispatch, pcntl_signal_get_handler, pcntl_sigprocmask, pcntl_sigtimedwait, pcntl_sigwaitinfo, pcntl_strerror, pcntl_unshare, pcntl_wait, pcntl_waitpid, pcntl_wexitstatus, pcntl_wifcontinued, pcntl_wifexited, pcntl_wifsignaled, pcntl_wifstopped, pcntl_wstopsig, pcntl_wtermsig,            
PHP Exif Support                   N/A                                                    YES                                                      
PHP IPTC Support                   N/A                                                    YES                                                      
PHP Loaded Extensions              N/A                                                    Core, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, bcmath, bz2, calendar, ctype, curl, date, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, intl, json, ldap, libxml, litespeed, mbstring, memcached, msgpack, mysqli, mysqlnd, openssl, pcntl, pcre, pdo_mysql, pdo_sqlite, posix, pspell, readline, redis, session, soap, sockets, sodium, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, timezonedb, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib            
PHP Max Execution Time             >=30 seconds                                           60                                           Pass        
PHP Max Input Time                 >=30 seconds                                           120                                          Pass        
PHP Memory Limit                   >=256M                                                 256M                                         Pass        
PHP Post Max Size                  >=2M                                                   30M                                          Pass        
PHP Safe Mode Disabled             =true                                                  true                                         Pass        
PHP Upload Max Filesize            >=2M                                                   20M                                          Pass        
PHP Version                        >=7.4                                                  7.4.33                                       Pass        
PHP XML Support                    N/A                                                    YES                                                      
SSL Extension Enabled              =true                                                  true                                         Pass        
SSL Warnings                       = empty                                                                                             Pass        

### MySQL                          Required                                               Detected                                     Status   ###

MySQL Client Encoding              N/A                                                    utf8                                                     
MySQL Mode                         N/A                                                    ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION            
MySQL Version                      >=5.0                                                  10.3.38-MariaDB-0ubuntu0.20.04.1             Pass        

### Server Configuration           Detected Value                                      ###

Accept Content                     text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Accept-Charset Content             N/A                                                    
Architecture                       64		 bit                                               
Gateway Interface                                                                         
HTTPS                              ON                                                     
Memory Usage                       7.86 MB                                                
Operating System                   Linux                                                  
Request Time                       1702664604                                             
Server Protocol                    HTTP/1.1                                               
Server self connect                Not expected HTTP response body:                       
Server Software                    LiteSpeed                                              
User Agent                         Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

### MainWP Dashboard Settings      Detected Value                                      ###

Abandoned plugins/themes tolerance 550                                                    
Basic uptime monitoring enabled    No                                                     
MainWP Dashboard Version           Latest: 4.5.3.2  Detected: 4.5.3.2 Pass                
MainWP legacy backups enabled      No                                                     
Maximum number of pages to return                                                         
Maximum number of posts to return                                                         
Maximum simultaneous install and update requests                                                       
Maximum simultaneous requests      4                                                      
Maximum simultaneous requests per ip1                                                      
Maximum simultaneous sync requests                                                        
Minimum delay between requests     200                                                    
Minimum delay between requests to the same ip1000                                                   
Number of connected sites          47                                                     
Optimize for shared hosting or big networksYes                                                    
Plugin advanced automatic updates enabledYes                                                    
Primary Backup System              MainWP UpdraftPlus Extension                           
REST API enabled                   No                                                     
Site health monitoring enabled     No                                                     
Theme advanced automatic updates enabledNo                                                     
Use WP Cron                        Yes                                                    
WP Core advanced automatic updates enabledNo                                                     

### Extensions                     Version                                                License                                      Status   ###

Advanced Uptime Monitor Extension  5.2.6                                                  Active                                       Pass        
MainWP Cache Control Extension     4.0.3                                                  Active                                       Pass        
MainWP Custom Dashboard Extension  4.1.2                                                  Active                                       Pass        
MainWP Domain Monitor Extension    4.1                                                    Active                                       Pass        
MainWP iThemes Security Extension  4.1.4                                                  Active                                       Pass        
MainWP Pro Reports Extension       4.2                                                    Active                                       Pass        
MainWP SSL Monitor Extension       4.0.5                                                  Active                                       Pass        
MainWP Sucuri Extension            4.1                                                    Active                                       Pass        
MainWP UpdraftPlus Extension       4.0.10                                                 Active                                       Pass        

### Plugin                         Version                                                Status                                    ###

FluentSMTP                         2.2.6                                                  Active                                       
Loginizer                          1.8.2                                                  Active                                       
MainWP Dashboard                   4.5.3.2                                                Active                                       
UpdraftPlus - Backup/Restore       2.23.14.26                                             Active                                       
WPCodeBox                          1.4.1                                                  Active                                       

The tokens don’t work for all sites, but here is a system report for one random site anyway.

### Server configuration           Required value                                         Value                                        Status   ###

MAINWP CHILD                       
                                   MainWP Child Version                                   4.5.3                                        4.5.3       Pass        
WordPress                          
                                   WordPress Version                                      >=3.4                                        6.4.2       Pass        
                                   WordPress Memory Limit                                 >=64M                                        40M         Warning     
                                   MultiSite Disabled                                     =true                                        true        Pass        
                                   FileSystem Method                                      = direct                                     direct      Pass        
PHP SETTINGS                       
                                   PHP Version                                            >=7.4                                        8.2.12      Pass        
                                   PHP Safe Mode Disabled                                 OFF                                          
                                   PHP Max Execution Time                                 >=30 seconds                                 3600        Pass        
                                   PHP Max Input Time                                     >=30 seconds                                 3600        Pass        
                                   PHP Memory Limit                                       >=128M (256M+ best for big backups)          1024M       Pass        
                                   PCRE Backtracking Limit                                >=10000                                      1000000     Pass        
                                   PHP Upload Max Filesize                                >=2M (2MB+ best for upload of big plugins)   50M         Pass        
                                   PHP Post Max Size                                      >=2M (2MB+ best for upload of big plugins)   100M        Pass        
                                   SSL Extension Enabled                                  =true                                        true        Pass        
                                   SSL Warnings                                           = empty                                      error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid key length
error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid key length
error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid key length
error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid key length
error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid key length
error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid key length
error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid key length
error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid key length
error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid key length
error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid key length
error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid key length
error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid key length
error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid key length
error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid key length
error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid key lengthWarning     
                                   cURL Extension Enabled                                 =true                                        true        Pass        
                                   cURL Timeout                                           >=300 seconds                                5           Warning     
                                   cURL Version                                           >=7.18.1                                     7.74.0      Pass        
                                   cURL SSL Version                                       >=OpenSSL/1.1.0                              OpenSSL/1.1.1wPass        
                                   OpenSSL Working Status                                 Yes                                          Yes         Pass        
MySQL SETTINGS                     
                                   MySQL Version                                          >=5.0                                        8.0.34-26   Pass        
BACKUP ARCHIVE INFORMATION         
                                   ZipArchive enabled in PHP                              =true                                        true        Pass        
                                   Tar GZip supported                                     =true                                        true        Pass        
                                   Tar BZip2 supported                                    =true                                        true        Pass        
SERVER INFORMATION                 
                                   WordPress Root Directory                               /nas/content/live/xxxxxxxxx/            
                                   Server Name                                            xxxxxxxxxxx.org                        
                                   Server Software                                        Apache                                       
                                   Operating System                                       Linux                                        
                                   Architecture                                           64 bit                                       
                                   Server IP                                              127.0.0.1                                    
                                   Server Protocol                                        HTTP/1.0                                     
                                   HTTP Host                                              xxxxxxxxxxxxxx.org                        
                                   HTTPS                                                  ON - on                                      
                                   Server self connect                                    Response Test O.K.                           
                                   User Agent                                             Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
                                   Server Port                                            80                                           
                                   Gateway Interface                                      CGI/1.1                                      
                                   Memory Usage                                           19.24 MB                                     
                                   Complete URL                                           https://xxxxxxxxxxxxxx.org/wp-admin/options-general.php?page=mainwp-reports-page
                                   Request Time                                           1702664863                                   
                                   Accept Content                                         text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
                                   Accept-Charset Content                                 N/A                                          
                                   Currently Executing Script Pathname                    /nas/content/live/xxxxxxxxxx/wp-admin/options-general.php
                                   Current Page URI                                       /wp-admin/options-general.php?page=mainwp_child_tab&tab=server-info
                                   Remote Address                                         xxx.xxx.xxx.xxx                              
                                   Remote Host                                            N/A                                          
                                   Remote Port                                            26814                                        
PHP INFORMATION                    
                                   PHP Allow URL fopen                                    ON                                           
                                   PHP Exif Support                                       YES ( V8.2.)                                 
                                   PHP IPTC Support                                       YES                                          
                                   PHP XML Support                                        YES                                          
                                   PHP Disabled Functions                                 apache_child_terminate, apache_get_modules, apache_get_version, apache_getenv, apache_note, apache_setenv, disk_free_space, disk_total_space, diskfreespace, dl, exec, fastcgi_finish_request, link, opcache_compile_file, opcache_get_configuration, opcache_invalidate, opcache_is_script_cached, opcache_reset, passthru, pclose, pcntl_exec, popen, posix_getpid, posix_getppid, posix_getpwuid, posix_kill, posix_mkfifo, posix_setegid, posix_seteuid, posix_setgid, posix_setpgid, posix_setsid, posix_setuid, posix_uname, proc_close, proc_get_status, proc_nice, proc_open, proc_terminate, realpath_cache_get, shell_exec, show_source, symlink, system,
                                   PHP Loaded Extensions                                  Core, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, apache2handler, bcmath, bz2, calendar, ctype, curl, date, dba, dom, exif, fileinfo, filter, ftp, gd, gettext, gmp, gnupg, hash, iconv, igbinary, imagick, imap, intl, json, ldap, libxml, mbstring, memcache, memcached, msgpack, mysqli, mysqlnd, newrelic, openssl, pcntl, pcre, pdo_mysql, pdo_sqlite, posix, random, redis, session, shmop, soap, sockets, sodium, sqlite3, ssh2, standard, sysvmsg, sysvsem, sysvshm, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib
MySQL INFORMATION                  
                                   MySQL Mode                                             ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
                                   MySQL Client Encoding                                  utf8mb4                                      
WordPress PLUGINS                  
                                   Akismet Anti-spam: Spam Protection                     5.3                                          Active                  
                                   Constant Contact Forms for WordPress                   2.4.1                                        Active                  
                                   Contact Form 7                                         5.8.4                                        Active                  
                                   Disable Gutenberg                                      3.1                                          Active                  
                                   Elementor                                              3.18.2                                       Active                  
                                   Elements Plus!                                         2.16.2                                       Active                  
                                   Enable Media Replace                                   4.1.5                                        Active                  
                                   Essential Addons for Elementor                         5.9.1                                        Active                  
                                   Flamingo                                               2.4                                          Active                  
                                   FluentSMTP                                             2.2.6                                        Active                  
                                   Google Analytics for WordPress by MonsterInsights      8.23.0                                       Active                  
                                   Livemesh Addons for Elementor                          8.2.1                                        Active                  
                                   MainWP Child                                           4.5.3                                        Active                  
                                   MainWP Child reports                                   2.2                                          Active                  
                                   Rank Math SEO                                          1.0.208.1                                    Active                  
                                   Really Simple CAPTCHA                                  2.2                                          Active                  
                                   Solid Security Pro                                     8.2.0                                        Active                  
                                   UpdraftPlus - Backup/Restore                           2.23.14.26                                   Active                  
                                   WP Compress | Image Optimizer                          6.10.34                                      Active                  
                                   WPForms Lite                                           1.8.5.3                                      Active                  

### Next due                       Schedule                                               Hook                                      ###

December 15, 2023 9:27 am          Once Hourly                                            wp_privacy_delete_old_export_files           
December 15, 2023 9:28 am          Every minute                                           action_scheduler_run_queue                   
December 15, 2023 10:04 am         Once Hourly                                            itsec_cron                                   
December 15, 2023 10:10 am         Once Hourly                                            mainwp_child_cron_theme_health_check_watcher 
December 15, 2023 10:15 am         Once Hourly                                            mainwp_child_cron_plugin_health_check_watcher
December 15, 2023 10:35 am                                                                WPEngineSecurityAuditor_Scans_fingerprint_core
December 15, 2023 10:42 am         Once Daily                                             jp_purge_transients_cron                     
December 15, 2023 10:46 am         Once Daily                                             elementor/tracker/send_event                 
December 15, 2023 11:10 am         Twice Daily                                            wp_mainwp_stream_auto_purge                  
December 15, 2023 11:14 am         Twice Daily                                            googlesitekit_cron_update_remote_features    
December 15, 2023 11:34 am         Once Daily                                             flamingo_daily_cron_job                      
December 15, 2023 11:43 am         Twice Daily                                            jetpack_waf_rules_update_cron                
December 15, 2023 1:19 pm          Once Daily                                             recovery_mode_clean_expired_keys             
December 15, 2023 1:37 pm          Once Weekly                                            wp_site_health_scheduled_check               
December 15, 2023 1:56 pm          Once Daily                                             itsec_cron                                   
December 15, 2023 2:07 pm          Once Daily                                             itsec_cron                                   
December 15, 2023 2:09 pm          Once Daily                                             itsec_cron                                   
December 15, 2023 2:09 pm          Twice Daily                                            itsec_cron                                   
December 15, 2023 2:10 pm          Once Daily                                             itsec_cron                                   
December 15, 2023 2:12 pm          Once Daily                                             itsec_cron                                   
December 15, 2023 2:13 pm          Once Daily                                             itsec_cron                                   
December 15, 2023 2:14 pm          Once Daily                                             itsec_cron                                   
December 15, 2023 2:20 pm          Once Daily                                             itsec_cron                                   
December 15, 2023 2:28 pm          Once Daily                                             akismet_scheduled_delete                     
December 15, 2023 2:48 pm          Once Daily                                             eael_remove_unused_options_data              
December 15, 2023 3:00 pm          Once Daily                                             rank_math/redirection/clean_trashed          
December 15, 2023 3:00 pm          Once Daily                                             rank_math/links/internal_links               
December 15, 2023 3:30 pm          Twice Daily                                            wp_update_user_counts                        
December 15, 2023 4:31 pm                                                                 WPEngineSecurityAuditor_Scans_fingerprint_themes
December 15, 2023 5:00 pm          Once Daily                                             updraft_backup                               
December 15, 2023 5:00 pm          Once Daily                                             updraft_backup_database                      
December 15, 2023 5:31 pm          Twice Daily                                            WPEngineSecurityAuditor_Scans_scheduler      
December 15, 2023 5:38 pm          Once Daily                                             fluentmail_do_daily_scheduled_tasks          
December 15, 2023 6:34 pm          Once Daily                                             rank_math/content-ai/update_prompts          
December 15, 2023 7:53 pm          Twice Daily                                            updraftplus_clean_temporary_files            
December 15, 2023 9:04 pm          Twice Daily                                            wp_version_check                             
December 15, 2023 9:04 pm          Twice Daily                                            wp_update_plugins                            
December 15, 2023 9:04 pm          Twice Daily                                            wp_update_themes                             
December 15, 2023 9:04 pm          Once Daily                                             wp_scheduled_delete                          
December 15, 2023 9:51 pm          Once Daily                                             wp_scheduled_auto_draft_delete               
December 15, 2023 11:03 pm         Once Daily                                             puc_cron_check_updates-updraftplus           
December 16, 2023 12:52 am                                                                itsec_cron_test                              
December 16, 2023 7:53 am          Once Daily                                             jetpack_v2_heartbeat                         
December 16, 2023 8:21 am          Once Daily                                             itsec_cron                                   
December 16, 2023 8:24 am          Token Expiry                                           refresh_token_job                            
December 16, 2023 9:13 am          Once Daily                                             mainwp_child_cron_theme_health_check_daily   
December 16, 2023 9:15 am          Once Daily                                             delete_expired_transients                    
December 16, 2023 9:17 am          Once Daily                                             mainwp_child_cron_plugin_health_check_daily  
December 16, 2023 9:48 am          Once Weekly                                            monsterinsights_usage_tracking_cron          
December 18, 2023 2:00 pm          Weekly WPForms Email Summaries                         wpforms_email_summaries_cron                 
December 19, 2023 7:31 am          Once Weekly                                            wp_delete_temp_updater_backups               
December 20, 2023 7:22 pm          Monthly MonsterInsights Email Summaries                monsterinsights_email_summaries_cron

Thanks for the system report.

These tokens have to be in a section loop. Otherwise no meaningful information can be displayed.

These tokens are working as expected in our testing outside the section loop.

Terms like activated, deactivated refer to a change of status of a plugin, not the current status.

So if you had one deactivated plugin during the selected date range, and you made it active, [plugin.activated.count] will show 1.

The same goes for all other .count tokens in this list.

Can I make the text output something instead of just blank? I would rather print “No changes” or something other than empty space or a 0 that kind of looks like an error.

Also is there such a thing as active count? I realize that this is somewhat meaningless due to the report having a range of dates, but even if it counted the active plugins only the last day of the date ranges, it’s better than nothing.

Unfortunately, the only possible output right now is 0 if there were no logged events for a token.

We don’t have such a token that would represent a number of currently installed/active plugins.

Please feel free to make a suggestion about this on our feedback site. That way, others can vote for it, letting us know which features our users want the most. https://feedback.mainwp.com

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.