Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The number of elements in the "wp plugin search" output is incorrect #156

Open
amieiro opened this issue Mar 6, 2019 · 1 comment
Open

Comments

@amieiro
Copy link
Contributor

amieiro commented Mar 6, 2019

# What is your system?
Description: Ubuntu 18.04.1 LTS
Linux homestead 4.15.0-38-generic #41-Ubuntu SMP Wed Oct 10 10:59:38 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

I use Laravel Homestead (Vagrant VM machine).

# Which version of PHP are you using?
PHP 7.2.11-4+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Nov 4 2018 05:11:49) ( NTS )

# Are you running suhosin?
No.

# Which version of WordPress are you using?
5.0.3

# Which version of WP-CLI are you using?
WP-CLI 2.1.0

# Can you share the results of which wp ?
File: /usr/local/bin/wp
Size: 5421617 Blocks: 10592 IO Block: 4096 regular file
Device: fd00h/64768d Inode: 917538 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2019-03-06 16:12:41.402428990 +0000
Modify: 2019-02-25 22:08:10.044998541 +0000
Change: 2019-02-25 22:08:11.836965987 +0000

# Are you running any packages?
No.

When I make a search in the plugin repository using the "wp plugin search" command with the parameter "--per-page", when I use 5 elements per page the result is correct.

$ wp plugin search ticketing --fields=version,slug,rating,num_ratings,downloaded --per-page=5
Success: Showing 5 of 145 plugins.
+--------------+--------------------------------+--------+-------------+------------+
| version      | slug                           | rating | num_ratings | downloaded |
+--------------+--------------------------------+--------+-------------+------------+
| 3.3.2        | tickera-event-ticketing-system | 92     | 89          | 124432     |
| 1.7.0        | camptix                        | 82     | 17          | 30473      |
| 1.7          | ticket-tailor                  | 78     | 26          | 51517      |
| 1.8.0        | my-tickets                     | 100    | 21          | 45666      |
| 4.9.79.decaf | event-espresso-decaf           | 86     | 97          | 152670     |
+--------------+--------------------------------+--------+-------------+------------+

But when I change to 10 elements per page, the output only shows 9 elements.

$ wp plugin search ticketing --fields=version,slug,rating,num_ratings,downloaded --per-page=10
Success: Showing 9 of 145 plugins.
+--------------+------------------------------------------+--------+-------------+------------+
| version      | slug                                     | rating | num_ratings | downloaded |
+--------------+------------------------------------------+--------+-------------+------------+
| 3.3.2        | tickera-event-ticketing-system           | 92     | 89          | 124432     |
| 1.7.0        | camptix                                  | 82     | 17          | 30473      |
| 1.7          | ticket-tailor                            | 78     | 26          | 51517      |
| 1.8.0        | my-tickets                               | 100    | 21          | 45666      |
| 4.9.79.decaf | event-espresso-decaf                     | 86     | 97          | 152670     |
| 2.9.0        | opentickets-community-edition            | 72     | 38          | 52530      |
| 0.6.0        | nanosupport                              | 84     | 13          | 4606       |
| 9.1.2        | wp-support-plus-responsive-ticket-system | 86     | 206         | 217930     |
| 2.1.1        | js-support-ticket                        | 82     | 42          | 63135      |
+--------------+------------------------------------------+--------+-------------+------------+

And it occurs the same when I change the parameter to 20 elements per page.

$ wp plugin search ticketing --fields=version,slug,rating,num_ratings,downloaded --per-page=20
Success: Showing 19 of 145 plugins.
+--------------+------------------------------------------+--------+-------------+------------+
| version      | slug                                     | rating | num_ratings | downloaded |
+--------------+------------------------------------------+--------+-------------+------------+
| 3.3.2        | tickera-event-ticketing-system           | 92     | 89          | 124432     |
| 1.7.0        | camptix                                  | 82     | 17          | 30473      |
| 1.7          | ticket-tailor                            | 78     | 26          | 51517      |
| 1.8.0        | my-tickets                               | 100    | 21          | 45666      |
| 4.9.79.decaf | event-espresso-decaf                     | 86     | 97          | 152670     |
| 2.9.0        | opentickets-community-edition            | 72     | 38          | 52530      |
| 0.6.0        | nanosupport                              | 84     | 13          | 4606       |
| 9.1.2        | wp-support-plus-responsive-ticket-system | 86     | 206         | 217930     |
| 2.1.1        | js-support-ticket                        | 82     | 42          | 63135      |
| 4.10.1       | event-tickets                            | 66     | 41          | 657330     |
| 5.8.9        | newsletter                               | 92     | 806         | 8000297    |
| 2.0.2        | ploxel                                   | 100    | 2           | 1232       |
| 2.4          | support-ticket-system-by-phoeniixx       | 96     | 4           | 48985      |
| 4.3          | ticketor                                 | 100    | 1           | 974        |
| 5.8.0        | awesome-support                          | 90     | 144         | 171455     |
| 4.2.6        | liveagent                                | 92     | 57          | 24740      |
| 1.0          | eventbee-ticketing-widget                | 0      | 0           | 522        |
| 1.0.62       | wats                                     | 80     | 58          | 88900      |
| 1.0.3        | line-up-event-calendar-and-ticketing     | 100    | 2           | 4014       |
+--------------+------------------------------------------+--------+-------------+------------+

@schlessera
Copy link
Member

That seems to be an upstream issue with the WordPress.org API. I created a Meta Trac ticket for this: https://meta.trac.wordpress.org/ticket/4253

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants