umchal
Forum Replies Created
-
Forum: Plugins
In reply to: [The SEO Framework – Fast, Automated, Effortless.] robots.txt shows 404That’s nice to hear. You too have a nice day!
Forum: Plugins
In reply to: [The SEO Framework – Fast, Automated, Effortless.] robots.txt shows 404Never mind. The site is installed in a sub-directory. In that case, the robot.txt cannot be dynamically displayed.
// robots.txt -only if installed at the root $home_path = parse_url( home_url() ); $robots_rewrite = ( empty( $home_path['path'] ) || '/' == $home_path['path'] ) ? array( 'robots\.txt$' => $this->index . '?robots=1' ) : array();Maybe it would be nice to show a warning message to the user for such a case.
Forum: Plugins
In reply to: [WP Popular Posts] Database tables are not installedSuggestions: maybe, in a future version, 1. add a check if the server supports InnoDB upon installation. 2. in the stats page, show a notification to tell the user that the necessary tables are do not exist for such cases.
I suggest these because this way, it prevents those who failed to installed the plugin properly like I did from spending too much time figuring out what’s going on. Currently, the user has too little clues.
I hope you consider it. Thank you.
Forum: Plugins
In reply to: [WP Popular Posts] Database tables are not installedOK, solved.
There was a line in the MySQL configuration file.
skip-innodbChanged it to
#skip-innodbAnd restarted the MySQL service. Then reinstalled the plugin. Now I see the two tables created.
Thank you.
Forum: Plugins
In reply to: [WP Popular Posts] Database tables are not installedAfter enabling the debug mode, I get the following in the
debug.log.[04-Dec-2019 17:13:37 UTC] WordPress database error Unknown storage engine 'InnoDB' for query CREATE TABLE wp_popularpostsdata ( postid bigint(20) NOT NULL, day datetime NOT NULL, last_viewed datetime NOT NULL, pageviews bigint(20) DEFAULT 1, PRIMARY KEY (postid) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE=InnoDB made by activate_plugin, do_action('activate_wordpress-popular-posts/wordpress-popular-posts.php'), WP_Hook->do_action, WP_Hook->apply_filters, WordPressPopularPosts\Activation\Activator::activate, WordPressPopularPosts\Activation\Activator::plugin_activate, WordPressPopularPosts\Activation\Activator::do_db_tables, dbDelta [04-Dec-2019 17:13:37 UTC] WordPress database error Unknown storage engine 'InnoDB' for query CREATE TABLE wp_popularpostssummary ( ID bigint(20) NOT NULL AUTO_INCREMENT, postid bigint(20) NOT NULL, pageviews bigint(20) NOT NULL DEFAULT 1, view_date date NOT NULL, view_datetime datetime NOT NULL, PRIMARY KEY (ID), KEY postid (postid), KEY view_date (view_date), KEY view_datetime (view_datetime) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE=InnoDB made by activate_plugin, do_action('activate_wordpress-popular-posts/wordpress-popular-posts.php'), WP_Hook->do_action, WP_Hook->apply_filters, WordPressPopularPosts\Activation\Activator::activate, WordPressPopularPosts\Activation\Activator::plugin_activate, WordPressPopularPosts\Activation\Activator::do_db_tables, dbDeltamysql_error.logdoes not show any log related to it.Forum: Fixing WordPress
In reply to: A non-numeric value encountered inIt is a known bug with the outdated SimplePie library incompatible with PHP 7.1 or above. See here and here. It occurs when you have a RSS widget. Try this plugin to avoid the warnings.
Forum: Requests and Feedback
In reply to: Why WordPress doesnt have SVN mirror on GitHubThere is another mirror.
Recently, I wanted to find plugins that use a particular library. And there seems to be no reliable means to search code among hosted plugins (and themes) at the moment. I thought this track search would give some results by using some partial code as a key phrase but it does not work well.
For example, say, you want to find plugins using a particular jQuery library which has a string
jquery-custom-content-scrollerin its code. Even if you type that, it doesn’t find anything. On the other hand, see this GitHub search results and this way, you can find some plugins.But the both GitHub mirrors are not picking up all of the new plugins. Some plugins are not indexed. So it’s not pointless to have a mirror on GitHub for the ability to search code.
Figured it!
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts LEFT JOIN wp_postmeta AS mt ON ( wp_posts.ID = mt.post_id AND mt.meta_key = '_shop_id' ) LEFT JOIN wp_posts AS p2 ON ( mt.meta_key = '_shop_id' AND mt.meta_value = p2.ID ) WHERE 1=1 AND ( mt.meta_key IS NOT NULL AND p2.ID IS NULL ) AND wp_posts.post_type = 'book' AND ((wp_posts.post_status <> 'trash' AND wp_posts.post_status <> 'auto-draft')) GROUP BY wp_posts.IDAh, actually it doesn’t check whether the shop post exists or not, which is required.
And I’m looking for something more efficient like this one, like with one query.
SELECT t1.name FROM table1 t1 LEFT JOIN table2 t2 ON t2.name = t1.name WHERE t2.name IS NULLBut thanks for the help though.
It was helpful. Thank you!
Forum: Fixing WordPress
In reply to: Callback called twice when method name and class name is sameOh, I see. Thank you!
Thanks for your insight.
I was using Codeception to run tests and it seems that Codeception calls the
tearDownAfterClass()method after all the test cases are done (https://github.com/Codeception/Codeception/issues/3198) and it is after the database connection is closed. That seems to be the cause of the error.As a workaround, I created a class extending
WP_UnitTestCaseby overriding thetearDownAfterClass()method to have the code of v4.6.x or below and made all tests use the extended class. This at least dodges the error.Forum: Hacks
In reply to: Creating a widget with input fields compatible with Theme CustomizerThat is something I was looking for. Thank you!
Forum: Hacks
In reply to: Hide Certain Comments with Comment Meta in Front-endActually I have found the
parse_comment_queryfilter and could add themeta_queryargument to exclude items with certain meta keys.Thanks for your input though.
Forum: Plugins
In reply to: [Responsive Pricing Table] URL Query Arguments For Button LinkHi,
Yeah, I’m interested. But it is just a suggestion to use the
apply_filters()function for the button link url so that it can be modified from a different plugin. Using the function will provide a convenient means to customize the behavior of the plugin. So it is recommended.