AA-Template.php
3 months ago
other_config.php
3 months ago
save-button.php
3 months ago
staging.php
3 months ago
store_config.php
3 months ago
troubleshooting.php
3 months ago
what_backed_up.php
3 months ago
where_config.php
3 months ago
troubleshooting.php
289 lines
| 1 | <?php |
| 2 | |
| 3 | // Namespace |
| 4 | namespace BMI\Plugin\Dashboard; |
| 5 | |
| 6 | // Use |
| 7 | use BMI\Plugin\Checker\System_Info as SI; |
| 8 | |
| 9 | // Exit on direct access |
| 10 | if (!defined('ABSPATH')) { |
| 11 | exit; |
| 12 | } |
| 13 | |
| 14 | // Tooltips |
| 15 | $ctl = __("Your account on Wordpress.org (where you open a new support thread) is different to the one you login to your WordPress dashboard (where you are now). If you don’t have a WordPress.org account yet, please sign up at the top right on the Support Forum page, and then scroll down on that page . It only takes a minute :) Thank you!", 'backup-backup'); |
| 16 | |
| 17 | $bmiTroubleshootingLogShareInfo = __("You will share: Website URL, %s1backup logs%s2, %s3restore logs%s2, %s4staging logs%s2, our plugin logs and configuration, and basic data about your site. No confidential data, such as email, will be shared.", 'backup-backup'); |
| 18 | $bmiTroubleshootingLogShareInfo2 = __("No confidential data such as email gets shared.", 'backup-backup'); |
| 19 | |
| 20 | $bmiTroubleshootingLogShareInfo = str_replace('%s1', '<a href="#" class="download-backup-log-url hoverable secondary" download="backup_logs.txt">', $bmiTroubleshootingLogShareInfo); |
| 21 | $bmiTroubleshootingLogShareInfo = str_replace('%s3', '<a href="#" class="download-restore-log-url hoverable secondary" download="restore_logs.txt">', $bmiTroubleshootingLogShareInfo); |
| 22 | $bmiTroubleshootingLogShareInfo = str_replace('%s4', '<a href="#" class="download-staging-log-url hoverable secondary" download="staging_logs.txt">', $bmiTroubleshootingLogShareInfo); |
| 23 | $bmiTroubleshootingLogShareInfo = str_replace('%s2', '</a>', $bmiTroubleshootingLogShareInfo); |
| 24 | |
| 25 | $pros = false; |
| 26 | if (defined('BMI_BACKUP_PRO') && BMI_BACKUP_PRO == 1) { |
| 27 | $pros = true; |
| 28 | } |
| 29 | $allowed_html = [ |
| 30 | 'a' => [ |
| 31 | 'href' => true, |
| 32 | 'class' => true, |
| 33 | 'download' => true, |
| 34 | ], |
| 35 | 'br' => true, |
| 36 | ]; |
| 37 | |
| 38 | ?> |
| 39 | |
| 40 | <div class="mm mt mb f20 lh40"> |
| 41 | |
| 42 | <div class="mbl"> |
| 43 | <?php esc_html_e("If something doesn't work, you have several options - pick one:", 'backup-backup'); ?> |
| 44 | </div> |
| 45 | |
| 46 | <table class="center-table trouble-section"> |
| 47 | |
| 48 | <tr class="lh28"> |
| 49 | <td style="width: <?php echo $pros ? '50' : '33'?>%"> |
| 50 | <a href="https://wordpress.org/support/plugin/backup-backup/" target="_blank" class="nodec"> |
| 51 | <div class="shadow"> |
| 52 | <div class="flex flexcenter mtl mtb"> |
| 53 | <div style="width: 66px; height: 63px;"> |
| 54 | <svg style="width: 66px; height: 63px;"><use xlink:href="<?php echo esc_url($this->get_asset('images', 'support-1.svg')); ?>#img"></use></svg> |
| 55 | </div> |
| 56 | <div class="semibold"> |
| 57 | <?php esc_html_e("Ask us in the Support forum", 'backup-backup'); ?> |
| 58 | </div> |
| 59 | </div> |
| 60 | <div class="f16"> |
| 61 | <?php esc_html_e("This is your first port of call. We'll try to respond quickly!", 'backup-backup'); ?> |
| 62 | </div> |
| 63 | </div> |
| 64 | </a> |
| 65 | </td> |
| 66 | <?php if (!$pros): ?> |
| 67 | <td style="width: 33%"> |
| 68 | <a href="<?php echo esc_url(BMI_AUTHOR_URI ); ?>" target="_blank" class="nodec"> |
| 69 | <div class="shadow"> |
| 70 | <div class="flex flexcenter mtl mtb"> |
| 71 | <div style="width: 69px; height: 63px;"> |
| 72 | <svg style="width: 69px; height: 63px; margin-top: 10px;"><use xlink:href="<?php echo esc_url($this->get_asset('images', 'support-2.svg')); ?>#img"></use></svg> |
| 73 | </div> |
| 74 | <div class="semibold"> |
| 75 | <?php esc_html_e("Get the Premium Plugin", 'backup-backup'); ?> |
| 76 | </div> |
| 77 | </div> |
| 78 | <div class="f16"> |
| 79 | <?php esc_html_e("...which includes support, so we can help you in more detail if you get stuck.", 'backup-backup'); ?> |
| 80 | </div> |
| 81 | </div> |
| 82 | </a> |
| 83 | </td> |
| 84 | <?php endif; ?> |
| 85 | <td style="width: <?php echo $pros ? '50' : '33'?>%"> |
| 86 | <div class="shadow" id="open_trouble_extenstion"> |
| 87 | <div class="flex flexcenter mtl mtb"> |
| 88 | <div style="width: 70px; height: 63px;"> |
| 89 | <svg style="width: 70px; height: 63px;"><use xlink:href="<?php echo esc_url($this->get_asset('images', 'support-3.svg')); ?>#img"></use></svg> |
| 90 | </div> |
| 91 | <div class="semibold"> |
| 92 | <?php esc_html_e("Check advanced options", 'backup-backup'); ?> |
| 93 | </div> |
| 94 | </div> |
| 95 | <div class="f16"> |
| 96 | <?php esc_html_e("...in an effort to fix it yourself. Be sure you know what you are doing!", 'backup-backup'); ?> |
| 97 | </div> |
| 98 | </div> |
| 99 | </td> |
| 100 | </tr> |
| 101 | <tr> |
| 102 | <td class="mtlll"> |
| 103 | <span class="tooltip hoverable info-cursor f18" tooltip="<?php echo esc_attr($ctl); ?>"><?php esc_html_e("Cannot log in there?", 'backup-backup'); ?></span> |
| 104 | </td> |
| 105 | <td></td> |
| 106 | <td></td> |
| 107 | </tr> |
| 108 | |
| 109 | </table> |
| 110 | |
| 111 | </div> |
| 112 | |
| 113 | <div id="trouble_extenstion" class="f20" style="display: none; min-width: calc(100% - 45px - 45px);"> |
| 114 | |
| 115 | <div class="mm"> |
| 116 | <div class="f26 semibold mb"> |
| 117 | <?php esc_html_e("Troubleshooting settings", 'backup-backup'); ?> |
| 118 | </div> |
| 119 | </div> |
| 120 | |
| 121 | <div class="mm bmi-troubleshooting-btn-mm"> |
| 122 | |
| 123 | <div class="f20 semibold"> |
| 124 | <?php esc_html_e("Send troubleshooting data", 'backup-backup'); ?> |
| 125 | </div> |
| 126 | |
| 127 | <div class="f16 mtll mbll bmi-troubleshooting-btn-section"> |
| 128 | <div class="bmi-troubleshooting-btn-text"> |
| 129 | <?php esc_html_e("Send us the debug information of your latest failed backup or restore, so that we can investigate.", 'backup-backup'); ?> |
| 130 | </div> |
| 131 | <div class="bmi-inline"> |
| 132 | <a href="#" class="btn bmi-send-troubleshooting-logs bmi-troubleshooting-btn mm30"><?php esc_html_e("Share debug info with the BackupBliss team.", 'backup-backup'); ?></a> |
| 133 | </div> |
| 134 | <div class="bmi-troubleshooting-info-logs"> |
| 135 | <?php echo wp_kses($bmiTroubleshootingLogShareInfo, $allowed_html); ?><br> |
| 136 | <?php echo wp_kses($bmiTroubleshootingLogShareInfo2, $allowed_html); ?> |
| 137 | </div> |
| 138 | </div> |
| 139 | |
| 140 | </div> |
| 141 | |
| 142 | <div class="mm"> |
| 143 | <div class="f20 semibold"> |
| 144 | <?php esc_html_e("Site information", 'backup-backup'); ?> |
| 145 | </div> |
| 146 | <div class="f16 mtll mbll"> |
| 147 | <?php esc_html_e("Here is some information about your site, which may help debug if there is an issue:", 'backup-backup'); ?> |
| 148 | </div> |
| 149 | </div> |
| 150 | |
| 151 | <div class="mm bg-second f16 mtl mbl lh25"> |
| 152 | <table style="width: 100%"> |
| 153 | <tbody> |
| 154 | |
| 155 | <?php |
| 156 | require_once BMI_INCLUDES . '/check/system_info.php'; |
| 157 | $info = new SI(); |
| 158 | $info = $info->to_array(); |
| 159 | $i = 0; |
| 160 | foreach ($info as $key => $value) { |
| 161 | $i++; ?> |
| 162 | <tr class="<?php echo(($i <= 7)?'ignored-tr':'hide-show-tr'); ?>"> |
| 163 | <th align="left"><?php echo esc_html(ucwords(str_replace('_', ' ', $key))); ?></th> |
| 164 | <td><?php |
| 165 | |
| 166 | if (is_object($value)) { |
| 167 | echo esc_html($value->format('Y-m-d H:i:s.u')); |
| 168 | } elseif (is_array($value)) { |
| 169 | if (sizeof($value) === 0) { |
| 170 | echo '---'; |
| 171 | } else { |
| 172 | if ($key == 'wp_active_themes_info') { |
| 173 | echo esc_html($value[0]['name']) . '@' . esc_html($value[0]['version']); |
| 174 | } elseif ($key == 'wp_active_plugins_info') { |
| 175 | $disp = ''; |
| 176 | for ($i = 0; $i < sizeof($value); ++$i) { |
| 177 | $disp .= esc_html($value[$i]['name']) . '@' . esc_html($value[$i]['version']) . ' | '; |
| 178 | } |
| 179 | echo esc_html(rtrim($disp, ' | ')); |
| 180 | } else { |
| 181 | echo esc_html(implode(' | ', $value)); |
| 182 | } |
| 183 | } |
| 184 | } elseif (is_bool($value)) { |
| 185 | echo $value === true ? 'true' : 'false'; |
| 186 | } else { |
| 187 | if (!$value || is_null($value) || strlen($value) == '0') { |
| 188 | echo '---'; |
| 189 | } else { |
| 190 | echo esc_html($value); |
| 191 | } |
| 192 | } ?></td> |
| 193 | </tr> |
| 194 | <?php |
| 195 | } |
| 196 | ?> |
| 197 | <tr class="ignored-tr"> |
| 198 | <th style="width: 400px"></th> |
| 199 | <td align="right"> |
| 200 | <span class="hoverable secondary" id="switch-show-trs" data-see="<?php echo esc_attr__( "See more", 'backup-backup'); ?>" data-hide="<?php echo esc_attr__( "Collapse", 'backup-backup'); ?>"> |
| 201 | <?php esc_html_e("See more", 'backup-backup'); ?> |
| 202 | </span> |
| 203 | </td> |
| 204 | </tr> |
| 205 | </tbody> |
| 206 | </table> |
| 207 | </div> |
| 208 | |
| 209 | <div class="mm mtll f16"> |
| 210 | <a href="#" class="nodec secondary hoverable" id="download-site-infos"><?php esc_html_e("Download your site info", 'backup-backup'); ?></a> <?php esc_html_e("(e.g., for easy sharing with us, so that we can debug)", 'backup-backup'); ?> |
| 211 | </div> |
| 212 | |
| 213 | <div class="mm mtl semibold"> |
| 214 | <?php esc_html_e("Logging", 'backup-backup'); ?> |
| 215 | </div> |
| 216 | |
| 217 | <div class="mm mtll f16 lh28"> |
| 218 | <?php esc_html_e("All backup creation and restore processes are documented in log files, which can be used to debug issues.", 'backup-backup'); ?> |
| 219 | <a href="<?php echo esc_url( get_site_url() . '/?backup-migration=PROGRESS_LOGS&progress-id=complete_logs.log&bmi-id=current&t=' . time() . '&sk=' . bmi_get_config('REQUEST:SECRET') ); ?>" |
| 220 | download="troubleshooting-logs.txt" class="nodec hoverable secondary"> |
| 221 | <?php esc_html_e("Download logs.", 'backup-backup'); ?> |
| 222 | </a> |
| 223 | </div> |
| 224 | |
| 225 | <div class="mm mtl semibold"> |
| 226 | <?php esc_html_e("Backup/restore process issues", 'backup-backup'); ?> |
| 227 | </div> |
| 228 | |
| 229 | <div class="mm mtll f16 lh28"> |
| 230 | <?php esc_html_e("If you are sure the backup process is not running but you can't stop it, ", 'backup-backup'); ?> |
| 231 | <a href="#!" id="bmi-force-backup-to-stop" class="nodec hoverable secondary"> |
| 232 | <?php esc_html_e("force the process to stop.", 'backup-backup'); ?> |
| 233 | </a> |
| 234 | <br> |
| 235 | <?php esc_html_e("If you are sure the restore process is not running but you can't stop it, ", 'backup-backup'); ?> |
| 236 | <a href="#!" id="bmi-force-restore-to-stop" class="nodec hoverable secondary"> |
| 237 | <?php esc_html_e("force the restoration to stop.", 'backup-backup'); ?> |
| 238 | </a> |
| 239 | <br> |
| 240 | <span><?php esc_html_e('*If the process is still running after being killed, it probably is still running (for real). Wait a bit for it to fail.', 'backup-backup'); ?></span> |
| 241 | </div> |
| 242 | |
| 243 | <div class="mm mtl semibold"> |
| 244 | <?php esc_html_e("Error: php_uname is disabled for security reasons", 'backup-backup'); ?> |
| 245 | </div> |
| 246 | |
| 247 | <div class="mm mtll f16 lh28"> |
| 248 | <?php esc_html_e("Some hosting providers block the php_uname function, which is required by the pclzip module included in WordPress.", 'backup-backup'); ?><br> |
| 249 | <?php esc_html_e("You can automatically replace the function with compatible code:", 'backup-backup'); ?> |
| 250 | <a href="#" class="nodec secondary hoverable" id="fix-uname-issues"><?php esc_html_e("replace the php_uname function in the pclzip file.", 'backup-backup'); ?></a><br> |
| 251 | <?php esc_html_e("You can also restore the changes with one click if something goes wrong:", 'backup-backup'); ?> |
| 252 | <a href="#" class="nodec secondary hoverable" id="revert-uname-issues"><?php esc_html_e("restore the original pclzip file (it will work after the first replacement).", 'backup-backup'); ?></a> |
| 253 | </div> |
| 254 | |
| 255 | <div class="mm mtl semibold"> |
| 256 | <?php esc_html_e("Test email", 'backup-backup'); ?> |
| 257 | </div> |
| 258 | |
| 259 | <div class="mm mtll f16 lh28"> |
| 260 | <?php esc_html_e("If you want to know if your server is properly configured to send emails, you can test it here.", 'backup-backup'); ?><br> |
| 261 | <?php esc_html_e("Remember that even if you get a success alert, there may still be some issues.", 'backup-backup'); ?> <?php esc_html_e("Check if the email is visible in your mailbox / spam folder.", 'backup-backup'); ?><br> |
| 262 | <?php esc_html_e("The message will be sent to the email you provided in the ", 'backup-backup'); ?> <a href="#" class="collapser-openner nodec secondary hoverable" data-el="#other-options"><?php esc_html_e("other options", 'backup-backup'); ?></a>.<br> |
| 263 | <a href="#" id="bmi_send_test_mail" class="nodec hoverable secondary"><?php esc_html_e("Click here", 'backup-backup'); ?></a> <?php esc_html_e("to send the email.", 'backup-backup'); ?><br> |
| 264 | </div> |
| 265 | |
| 266 | <div class="mm mtl mbll semibold"> |
| 267 | <?php esc_html_e("Reset configuration", 'backup-backup'); ?> |
| 268 | </div> |
| 269 | |
| 270 | <div class="mm mb f16"> |
| 271 | <?php esc_html_e("Please", 'backup-backup'); ?> <a href="#" class="hoverable secondary bmi-modal-opener nodec" data-modal="reset-confirm-modal"><?php esc_html_e("click here", 'backup-backup'); ?></a> <?php esc_html_e("to reset the plugin configuration.", 'backup-backup'); ?> |
| 272 | </div> |
| 273 | |
| 274 | <div class="mm mb f18"> |
| 275 | <?php esc_html_e("If you're looking for other options not listed above, check out the", 'backup-backup'); ?> <a href="#" class="collapser-openner nodec secondary hoverable" data-el="#other-options"><?php esc_html_e('"Other options"', 'backup-backup'); ?></a> <?php esc_html_e("chapter as they might be there.", 'backup-backup'); ?> |
| 276 | </div> |
| 277 | |
| 278 | <div class="mm mb f18 lh28"> |
| 279 | <?php esc_html_e("If your site is having issues with scheduled backups or uploading backups to remote storage, ", 'backup-backup'); ?> |
| 280 | <a href="#" class="hoverable secondary nodec" id="resync-with-ping-server"><?php esc_html_e("click here to resync with our ping server.", 'backup-backup'); ?></a><br> |
| 281 | <?php esc_html_e("If the issue persists, please contact support.", 'backup-backup'); ?> |
| 282 | </div> |
| 283 | </div> |
| 284 | |
| 285 | <div class="mm center f20 mb"> |
| 286 | <a href="#" class="text-muted close-chapters nodec"><?php esc_html_e("Collapse this chapter", 'backup-backup'); ?></a> |
| 287 | </div> |
| 288 | <div class="mbll"></div> |
| 289 |