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