GithubHelp home page GithubHelp logo

afragen / wordpress-beta-tester Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mlteal/wordpress-beta-tester

29.0 8.0 24.0 3.1 MB

WordPress Beta Tester plugin

Home Page: https://wordpress.org/plugins/wordpress-beta-tester/

PHP 98.26% CSS 1.17% JavaScript 0.57%

wordpress-beta-tester's Introduction

WordPress Beta Tester

Allows you to easily upgrade for testing the next versions of WordPress.

Description

This plugin provides an easy way to get involved with beta testing WordPress.

Once installed it will enable you to upgrade your website to the latest Nightly, Beta, or Release Candidate at the click of a button using the built in upgrader.

By default once enabled it switches your website onto the point release development track.

For the more adventurous there is the option to switch to the bleeding edge (trunk) of development.

Don't forget to backup before you start!

Please enable auto-updates for this plugin to ensure future changes are properly handled with core updates.

Extra Settings

There is a setting to Skip successful autoupdate emails. It functions to disable sending emails to the admin user for successful autoupdates. Only emails indicating failures of the autoupdate process are sent.

There is a setting to Hide the Report a Bug feature.

Report a Bug

This feature will hopefully promote the testing and reporting of issues to the appropriate location.

There is a Report a Bug admin menu item to directly take the user to the Report a Bug tab in WordPress Beta Tester. In the Report a Bug tab you can copy a bug report template for use in Trac or GitHub.

PRs are welcome on GitHub.

wordpress-beta-tester's People

Contributors

0averyan avatar afragen avatar alexclassroom avatar audrasjb avatar costdev avatar mlteal avatar pbiron avatar pedro-mendonca avatar preciousomonze avatar theautistictechie avatar tobifjellner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wordpress-beta-tester's Issues

Safari version used in "Report a Bug" feature could be confusing

In macOS, the new Report a Bug feature emits the Safari/x.x.x version found in the User-Agent string, but the Safari app itself reports the version from Version/x.x.x 🙃 (I did not test this behavior in Windows.)

For instance, given the following UA:

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Safari/605.1.15

The scraped Safari version is:
Report a Bug environment info

Compare this with the version reported in Safari's About... menu:
Safari About dialog

It would be less confusing for the Report a Bug feature to use the same version reported in Safari's UI.

"Report a Bug" shown in admin-bar for none admin users

If a user for example contributor clicks on the link "Report a Bug" in top wp-admin bar they will get "Sorry, you are not allowed to access this page."

If the user don't have correct access, it would be preferred that the "Report a Bug" is not shown in the top admin bar meny

PHP 8.1: Deprecated: explode()

get_current_wp_release() returns null, if the API responds with an error:

if ( is_wp_error( $response ) ) {
return null;
}

This value is used as 2. parameter in explode():

$current_release        = $this->wp_beta_tester->get_current_wp_release();
$next_release           = array_map( 'intval', explode( '.', $current_release ) );

With PHP 8.1 I get an error:
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated

Not an error but a hint

If I switch from Bleeding Edge or Beta/RC - Bleeding edge it to Point releases, I get an error message:

“Error: Your current WordPress Beta Tester plugin configuration will downgrade your install to a previous version – please reconfigure it.”

But it is not really an error, since it is my decision to test a future minor release (of 5.3 atm). This should be (imo) “Hint: Your current …”

Image 2020-03-09 at 7 26 44 PM

2.0 feedback

I've been very fortunate to take over maintenance of the WordPress Beta Tester plugin.

Recent discussions on #core-php Slack have discussed the possibility of using feature flags activated via the Beta Tester plugin to activate/test certain code in trunk that is unable to be placed in a plugin due to its close integration with parts of core.

To that end I have dramatically refactored the WordPress Beta Tester plugin, both to accommodate a new tab for additional settings as well as bring the code into a more OOP direction and make it a bit easier to maintain ( at least for me 😉 ). It is still compatible with PHP 5.2.4 but has a bump to require WP 3.1.

I have added a GitHub Plugin URI header to v1.2.6 so that anyone wishing to easily test can simply install the GitHub Updater plugin. In the GHU settings choose branch switching to switch between the master and feature/2.0 branches for testing.

I am looking for some feedback on anything and everything. I invite @westi, as the owner, in addition to those active in the #core-php channel for their feedback, @schlessera, @SergeyBiryukov, @felixarntz, @nerrad, and anyone else.

https://github.com/afragen/wordpress-beta-tester/tree/release/2.0

Thanks.

"Report a bug" MU-plugin shows None activated

Bug Report

Must use plugin "WordPress automation by Installatron" is not shown in the Environment list.

Also -MU-PluginsNone activated
Would be nice if : and space would be added to follow same structure as other environment. -MU-Plugins: None activated

Environment

  • OS: Windows 10
  • Server: Apache (Linux)
  • PHP: 8.1.16
  • WordPress: 6.2-RC2
  • Browser: Edge
  • Theme: GeneratePress 3.2.4
  • MU-PluginsNone activated
  • Plugins:
      * Akismet Anti-Spam 5.0.2
      * Code Snippets 3.3.0
      * Core Rollback 1.3.4
      * Enable jQuery Migrate Helper 1.3.0
      * Jetpack Protect 1.3.0
      * Limit Login Attempts Reloaded 2.25.13
      * LiteSpeed Cache 5.3.3
      * Ninja Forms 3.6.20
      * OMGF 5.5.5.1
      * OMGF Pro 3.7.3
      * Performance Lab 2.0.0
      * Plugin Compatibility Checker 1.9
      * Plugin Dependencies 1.7.8
      * Query Monitor 3.12.0
      * Rank Math SEO 1.0.110.1
      * Simple Social Icons 3.1.1
      * Stop User Enumeration 1.4.6
      * WordPress Beta Tester 3.3.1
      * WP SMS 6.1.1

Steps to Reproduce

1. Use Must use plugin "WordPress automation by Installatron" mu-plugin
2. 🐞 Bug occurs.

Expected Results

1.  ✅ Must use plugin "WordPress automation by Installatron" should be shown.

Actual Results

1.  ❌ - MU-PluginsNone activated

Undefined property notice when using SQLite

When running WordPress on SQLite, the following notice is logged when viewing the "Report a Bug" tab:

Notice: Undefined property: WP_SQLite_DB\PDOEngine::$client_info in ../WPBT_Bug_Report.php on line 282

The output for the bug template reflects the following database info:

- Database: WP_SQLite_DB\PDOEngine (Server: 5.5 / Client: )

(I haven't tested this with the "official" SQLite canonical plugin, but it's based on the same code as linked above.)

Tested using WPBT 3.3.6.

Possible wrong punctuation mark in a string.

In my honest opinion, the string:

"Why don&#8217;t you <a href="update-core.php">head on over and upgrade now</a>." sounds like a question and shouldn't end in a "." but a "?". I have a PR for this: #34

Copy to clipboard “report a bug”

Copy to clipboard and then past looks like this:

earlier version didn’t do this tab when pasting, is it a bug or new feature?

	## Bug Report
	### Description
	Describe the bug.

	### Environment
	- WordPress: 6.2-RC4
  • PHP: 8.2.3
  • Server: LiteSpeed
  • Database: mysqli (Server: 10.4.28-MariaDB / Client: mysqlnd 8.2.3)
  • Browser: Safari 16.3 (Mobile) (iPhone)
  • Theme: GeneratePress 3.3.0
  • MU-Plugins:
    • WordPress automation by Installatron
  • Plugins:
    • Advanced Database Cleaner 3.1.2

    • All-in-One WP Migration 7.72

    • Code Snippets 3.3.0

    • Git Updater 12.1.3

    • GP Premium 2.3.0

    • Query Monitor 3.12.1

    • WordPress Beta Tester 3.3.5

    • WP Crontrol 1.15.2

    • WP SMS 6.1.2

      ### Steps to Reproduce
      1. 
      2. 🐞 Bug occurs.
      
      ### Expected Results
      1.  ✅ What should happen.
      
      ### Actual Results
      1.  ❌ What actually happened.
      

Possible Duplicate Code found 🕵🏽‍♂️

Possible code duplicate here:

<?php if ( false && 'branch-development' === self::$options['channel'] ) : ?>

From line 299 through 312
Reference below:

		<?php if ( false && 'branch-development' === self::$options['channel'] ) : ?>
			<tr>
				<th><label><input name="wp-beta-tester-beta-rc" id="update-stream-beta" type="radio" value="branch-beta" class="tog" <?php checked( 'branch-beta', self::$options['stream-option'] ); ?> />
				<?php esc_html_e( 'Beta/RC Only', 'wordpress-beta-tester' ); ?>
				</label></th>
				<td><?php esc_html_e( 'This is for the Beta/RC releases only of the selected channel.', 'wordpress-beta-tester' ); ?></td>
			</tr>
			<tr>
				<th><label><input name="wp-beta-tester-beta-rc" id="update-stream-rc" type="radio" value="branch-rc" class="tog" <?php checked( 'branch-rc', self::$options['stream-option'] ); ?> />
				<?php esc_html_e( 'Release Candidates Only', 'wordpress-beta-tester' ); ?>
				</label></th>
				<td><?php esc_html_e( 'This is for the Release Candidate releases only of the selected channel.', 'wordpress-beta-tester' ); ?></td>
			</tr>
			<?php endif; ?>

For Recap purpose: branch-development shows that stream option has the first value. see db data here.
image
Maybe I'm missing something 🤔

Things to do

PHP 5.3

  • use composer and autoloader
  • composer update

PHP 5.4

  • use class instantiation and method call in single command

“Report a bug” missing WordPress Beta Tester plugin in list

The Activated plugin “WordPress Beta Tester Version 3.3.0“ is not shown in the plugin list.

Bug Report

Describe the bug.

Environment

  • OS: iPhone
  • Server: Apache (Linux)
  • PHP: 8.1.16
  • WordPress: 6.2-RC2
  • Browser: Safari 604.1 (Mobile)
  • Theme: GeneratePress
  • Plugins:
      * Query Monitor 3.12.0
      * Akismet Anti-Spam 5.0.2
      * Code Snippets 3.3.0
      * Core Rollback 1.3.4
      * Enable jQuery Migrate Helper 1.3.0
      * OMGF Pro 3.7.3
      * OMGF 5.5.5.1
      * Jetpack Protect 1.3.0
      * Limit Login Attempts Reloaded 2.25.13
      * LiteSpeed Cache 5.3.3
      * Ninja Forms 3.6.20
      * Performance Lab 2.0.0
      * Plugin Compatibility Checker 1.9
      * Rank Math SEO 1.0.110.1
      * Simple Social Icons 3.1.1
      * Stop User Enumeration 1.4.6
      * Plugin Dependencies 1.7.8
      * WP SMS 6.1.1

Steps to Reproduce

1. 
2. 🐞 Bug occurs.

Expected Results

1.  ✅ What should happen.

Actual Results

1.  ❌ What actually happened.

incorrect "next versions" displayed when running an RC vesion

Running WP 5.6-RC1 & Beta Tester 3.0.4, with channel === Bleeding Edge and stream === Beta/RC Only, I see the following:

Currently your site is set to update to version 5.6-beta1, 5.6-RC2, or 5.6, whichever is released first.

The 5.6-beta1 should NOT be displayed there (and previously wasn't).

Not sure whether the fix should done be WPBT_Core::get_next_version() or in WPBT_Core::calculate_next_versions().

Bad strings hardcoded concatenation.

Currently there are a few new strings that concatenate like below:

  • Currently your site is set to update to version X.x.x.
  • Currently your site is set to update to version next development version. <-- issue
  • Currently your site is set to update to version X.x.x or X.x.x or X.x.x, whichever is released first. <-- ' or ' missing gettext

Consider change to:

  • Currently your site is set to update to version X.x.x.
  • Currently your site is set to update to next development version.
  • Currently your site is set to update to version X.x.x, X.x.x and X.x.x, whichever is released first. <-- using wp_sprintf

Array offset on a boolean

Notice: Trying to access array offset on value of type bool in /srv/users/userb1718256/apps/userb1718256/public/wp-content/plugins/wordpress-beta-tester/src/WPBT/WPBT_Bootstrap.php on line 128

It seems to happen sporadically, but something testing to make sure $value is an array before treating it as one here would probably remedy this:

if ( 0 === strpos( $value['stream'], 'beta-rc' )

Add ability to update from a plugin's beta

Not certain if there's a standard for how to keep a beta on the dot org SVN. If there is this should be doable. If there's no standard, we would likely need to create one.

Query Monitor usage shows database error

Bug Report

When using Query Monitor and going to Wordpress Dashboard there is a database error notice. If WordPress beta tester is inactive there is no notice.

Environment

  • WordPress: 6.2-RC2
  • PHP: 8.1.16
  • Server: LiteSpeed
  • Database: mysqli (Server: 10.4.28-MariaDB / Client: 10.4.28-MariaDB)
  • Browser: Edge 111.0.1661.44 (Windows 10/11)
  • Theme: Twenty Twenty-Three 1.1
  • MU-Plugins:
    • WordPress automation by Installatron
  • Plugins:
    • Code Snippets 3.3.0
    • Git Updater 12.1.2.3
    • Query Monitor 3.12.0
    • WordPress Beta Tester 3.3.2.1
    • WP SMS 6.1.1

Steps to Reproduce

  1. Use Query Monitor plugin and have WordPress Beta Tester active
  2. Go to "/wp-admin/index.php"
  3. 🐞 Bug occurs.

Expected Results

  1. ✅ No Error

Actual Results

  1. ❌ Error Shows in Query Monitor, But no error message is given.

Is this something in WordPress beta tester or is it a problem in query monitor as a false positive as no error message is given?

DELETE
FROM `wp_options`
WHERE `option_name` = '_transient_timeout_feed_mod_063c3a22b3af6d27076b025e59f22d9f'
add_option()
wp-includes/option.php:680
set_transient('feed_063c3a22b3af6d27076b025e59f22d9f')
wp-includes/option.php:988
WP_Feed_Cache_Transient->save()
wp-includes/class-wp-feed-cache-transient.php:83
SimplePie->init()
wp-includes/class-simplepie.php:1562
fetch_feed()
wp-includes/feed.php:829
wp_widget_rss_output()
wp-includes/widgets.php:1571
WP_Beta_Tester->parse_development_feed()
wp-content/plugins/wordpress-beta-tester/src/WPBT/WP_Beta_Tester.php:335
WP_Beta_Tester->beta_tester_dashboard()
wp-content/plugins/wordpress-beta-tester/src/WPBT/WP_Beta_Tester.php:303
do_meta_boxes()
wp-admin/includes/template.php:1445
wp_dashboard()
wp-admin/includes/dashboard.php:271

Replace the word beta with development

https://build.trac.wordpress.org/browser/trunk/wp-admin/update-core.php?marks=264#L264
This site is set up to install updates of future beta versions automatically.

This message appears under Dashboard -> Updates after you have activated Point release nightlies
When you use the word beta it is very confusing, because that's often not true: alpha, beta and RCs are tested and nightly builds. This is not self-evident for beginners when they read that future beta versions are installed automatically.

2020-03-17_09h25_31

“Report a Bug” minor improvement - move browser information

Minor improvement.

Would it be possible to move browser under OS as this is user specific information and the rest is server specific information.

Ex.

  • OS: iPhone
  • Browser: Safari 16.3 (Mobile)

Bug Report

Describe the bug.

Environment

  • OS: iPhone
  • Server: Apache (Linux)
  • PHP: 8.1.16
  • WordPress: 6.2-RC2
  • Browser: Safari 16.3 (Mobile)
  • Theme: GeneratePress 3.2.4
  • MU-Plugins:
      * WordPress automation by Installatron
  • Plugins:
      * Akismet Anti-Spam 5.0.2
      * Code Snippets 3.3.0
      * Core Rollback 1.3.4
      * Enable jQuery Migrate Helper 1.3.0
      * Jetpack Protect 1.3.0
      * Limit Login Attempts Reloaded 2.25.13
      * LiteSpeed Cache 5.3.3
      * Ninja Forms 3.6.20
      * OMGF 5.5.5.1
      * OMGF Pro 3.7.3
      * Performance Lab 2.0.0
      * Plugin Compatibility Checker 1.9
      * Plugin Dependencies 1.7.8
      * Query Monitor 3.12.0
      * Rank Math SEO 1.0.110.1
      * Simple Social Icons 3.1.1
      * Stop User Enumeration 1.4.6
      * WordPress Beta Tester 3.3.2
      * WP SMS 6.1.1

Steps to Reproduce

1. 
2. 🐞 Bug occurs.

Expected Results

1.  ✅ What should happen.

Actual Results

1.  ❌ What actually happened.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.