Category: Process Documentation

Flutter Outline is empty in Android Studio

Problem: the right panel option, Flutter Outline is showing nothing and seems not working.

Solution:

First make sure your application is currently running on device(real device or virtual device).

Then open Dart Analysis in the bottom panel, then click the “Restart Dart Analysis Server” button, the icon in red color.

Finally the Flutter Outline is working now.

phpMyAdmin has no type error

Problem: There is an error in phpMyAdmin export page -- “Field:group: xxx has no type”

Solution: update Form.php in phpMyAdmin path.

  1. Add below function in Form.php
    protected function cleanGroupPaths(array $form): array
    {
        foreach($form as &$name) {
            if (mb_strpos((string) $name, ':group:') === 0) {
                $name = str_replace('/', '-', $name);
            }
        }
        return $form;
    }

2. update loadForm function

    public function loadForm($form_name, array $form)
    {
        $this->name = $form_name;

        $form=$this->cleanGroupPaths($form);

        $this->readFormPaths($form);
        $this->readTypes();
    }
}

ref: https://github.com/williamdes/phpmyadmintest/commit/47971806316304f650ca1b3742e2a53801d2a794

phpMyAdmin problem – configuration storage is not completely configured, some extended features have been deactivated.

Problem: Some day enter Phpmyadmin then an message pop up -- “configuration storage is not completely configured, some extended features have been deactivated.”

Solution: You can create a table for storing configuration.

  1. import script from phpMyAdmin/sql/create_tables.sql
  2. create user and grant SELECT, INSERT, DELETE, UPDATE, ALTER privileges in phpMyAdmin.
  3. open config.inc.php and update below line (uncomment it)
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = 'password_you_set_in_phpmyadmin';

/* Storage database and tables */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';

Laravel show 403 error in Nginx

Problem: Migrate Laravel into Nginx, when enter index page, it cause a 403 error.

Solution: Go to Nginx config file, change try_files line to below line:

try_files $uri $uri/ /index.php?$query_string;

String id cannot be empty in WordPress

How to know it: Open the wp-config.php file and change for this line:

define('WP_DEBUG', false);

to true

define('WP_DEBUG', true);

Problem: Same situation like this using WPML Plugin.

Solution: check database, there are some rows which id is zero. Try to delete all of them.

Then, the table must not have primary key, so set a primary key and set auto increment.

SET timeout value to prevent long-running SELECT queries for Mysql/MariaDB

Problem: Some WordPress plugin cause a lot of long-running queries and seems to want to run forever:( (You can check it out by entering SQL command “show processlist;”)

Solution: Set up session-wide or global timeout:

For MySQL, enter below command

SET SESSION MAX_EXECUTION_TIME=2000;
SET GLOBAL MAX_EXECUTION_TIME=2000;

For MariaDB, enter below command:

SET SESSION max_statement_time=2000;
SET GLOBAL max_statement_time=2000;

2000 is 2000 second.

Solve “rediect too many times” in WordPress during migration

Problem: I’m using CentOS + Nginx + MySQL + phpMyAdmin. and all config is correct, which includes all the DB tables (domain updated), wp-config.php. but still encounter too many redirect problem.

Solution: If you sure you set up correctly, you can first delete all your tables, but not your database.

Then open https://yourdomain/wp-admin/install.php. Try to install the tables through WordPress wizard.

After you can enter the newly created default website, then go back to phpMyAdmin. Import the MySQL file again, it is ok to overwrite the original. Finally the problem solved.

Can not login due to “Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.” in WordPress multisite

Problem: try to log in a subdomain WordPress multisite website and receive below error message:

ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.

Solution: install Setup WordPress Multisite Domain Mapping

and in case you are using Cloudflare, try to add a page rule in Page Rules page:

*.domain.com/wp-*

Disable Security : Security is disabled
Browser Integrity Check : Off

ref: https://wordpress.stackexchange.com/a/331995, https://enterpr1se.info/2014/07/how-to-speed-up-wordpress/7/