afragen / git-updater

This WP plugin will update GitHub, Bitbucket, GitLab, and Gitea hosted plugins and themes
https://git-updater.com
MIT License
3.2k stars 462 forks source link

Update not showing #969

Closed sc0ttkclark closed 3 years ago

sc0ttkclark commented 3 years ago

Pods has historically been set up for Git Updater but when testing with Pods 2.8 (beta and RC releases) it seems to have some sort of issue seeing the newer version from GitHub.

Plugin file with proper header: https://github.com/pods-framework/pods/blob/release/2.8/init.php

Specifically, the Git Updater plugin only sees the .org plugin version (2.7.30) and does not show (2.8.0-rc.1) as the newest version.

To get here, I first installed the .org plugin, changed the php header for the plugin file to point the primary branch to release/2.8, updated the plugin version to 2.7.29 so it will look for an update, and only then did I do a fresh install of Git Updater for the site I'm using (it was never on the site before).

This is a multisite network with Git Updater network-activated.

I am using my own personal auth key for GitHub to make sure that it wasn't that. I have bypass WP Cron turned on. I check and recheck the updates screen but it only shows the 2.8 RC version as expected.

### wp-core ###

version: 5.8.1
site_language: en_US
user_language: en_US
timezone: America/Detroit
permalink: /%year%/%monthnum%/%day%/%postname%/
https_status: true
multisite: true
user_registration: false
blog_public: 0
default_comment_status: open
environment_type: production
user_count: 2
site_count: 4
network_count: 1
dotorg_communication: true

### wp-dropins (2) ###

fatal-error-handler.php: true
object-cache.php: true

### wp-active-theme ###

name: GeneratePress (generatepress)
version: 3.0.4
author: Tom Usborne
author_website: https://tomusborne.com
parent_theme: none
theme_features: core-block-patterns, widgets-block-editor, automatic-feed-links, post-thumbnails, post-formats, woocommerce, title-tag, html5, customize-selective-refresh-widgets, align-wide, responsive-embeds, custom-logo, menus, editor-style, widgets
theme_path: /chroot/home/a15ec611/0d271f4360.nxcli.net/html/wp-content/themes/generatepress
auto_update: Enabled

### wp-themes-inactive (3) ###

Twenty Nineteen: version: 2.1, author: the WordPress team, Auto-updates disabled
Twenty Twenty: version: 1.8, author: the WordPress team, Auto-updates disabled
Twenty Twenty-One: version: 1.4, author: the WordPress team, Auto-updates disabled

### wp-mu-plugins (1) ###

Nexcess Managed Apps: version: 1.24.2, author: Nexcess

### wp-plugins-active (8) ###

Git Updater: version: 10.5.2, author: Andy Fragen
GP Premium: version: 2.0.3, author: Tom Usborne
Gravity Forms: version: 2.5.10, author: Gravity Forms
NS Cloner - Site Copier: version: 4.1.7, author: Never Settle
Pods - Custom Content Types and Fields: version: 2.7.29, author: Pods Framework Team (latest version: 2.7.30)
Pods Alternative Cache: version: 2.1.2, author: Pods Framework Team
Pods Gravity Forms Add-On: version: 1.4.3, author: Pods Framework Team
Redis Object Cache: version: 2.0.21, author: Till Krüss

### wp-plugins-inactive (4) ###

Admin Columns Pro: version: 5.5.1, author: AdminColumns.com
Admin Columns Pro - Pods: version: 1.5.1, author: AdminColumns.com
Beaver Builder Plugin (Pro Version): version: 2.4.2.3, author: The Beaver Builder Team
WP All Import: version: 3.6.1, author: Soflyy

### wp-media ###

image_editor: WP_Image_Editor_Imagick
imagick_module_version: 1692
imagemagick_version: ImageMagick 6.9.12-21 Q16 x86_64 2021-09-04 https://imagemagick.org
imagick_version: 3.4.4
file_uploads: File uploads is turned off
post_max_size: 1536M
upload_max_filesize: 1536M
max_effective_size: 2 GB
max_file_uploads: 1,024
imagick_limits: 
    imagick::RESOURCETYPE_AREA: 210 GB
    imagick::RESOURCETYPE_DISK: 9.2233720368548E+18
    imagick::RESOURCETYPE_FILE: 768
    imagick::RESOURCETYPE_MAP: 210 GB
    imagick::RESOURCETYPE_MEMORY: 105 GB
    imagick::RESOURCETYPE_THREAD: 1
imagemagick_file_formats: 3FR, 3G2, 3GP, AAI, AI, APNG, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CR3, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, POCKETMOD, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIDEO, VIFF, VIPS, VST, WBMP, WEBM, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
gd_version: 2.3.2
gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM
ghostscript_version: 9.25

### wp-server ###

server_architecture: Linux 4.19.198-300.el7.x86_64 x86_64
httpd_software: Apache
php_version: 7.4.23 64bit
php_sapi: fpm-fcgi
max_input_variables: 16384
time_limit: 600
memory_limit: 2048M
max_input_time: -1
upload_max_filesize: 1536M
php_post_max_size: 1536M
curl_version: 7.29.0 NSS/3.53.1
suhosin: false
imagick_availability: true
pretty_permalinks: true
htaccess_extra_rules: true

### wp-database ###

extension: mysqli
server_version: 10.3.29-MariaDB
client_version: mysqlnd 7.4.23

### wp-constants ###

WP_HOME: undefined
WP_SITEURL: undefined
WP_MEMORY_LIMIT: 128M
WP_MAX_MEMORY_LIMIT: 2048M
WP_DEBUG: false
WP_DEBUG_DISPLAY: true
WP_DEBUG_LOG: false
SCRIPT_DEBUG: false
WP_CACHE: false
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_LOCAL_DEV: undefined
DB_CHARSET: utf8
DB_COLLATE: undefined

### wp-filesystem ###

wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable
mu-plugins: writable

### pods ###

pods-server-software: Apache
pods-user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36
pods-session-save-path: /dev/shm
pods-session-save-path-exists: Yes
pods-session-save-path-writable: Yes
pods-session-max-lifetime: 3600
pods-opcode-cache-apc: No
pods-opcode-cache-memcached: No
pods-opcode-cache-opcache: No
pods-opcode-cache-redis: No
pods-object-cache-apc: No
pods-object-cache-apcu: No
pods-object-cache-memcache: Yes
pods-object-cache-memcached: Yes
pods-object-cache-redis: Yes
pods-memory-current-usage: 52.652M
pods-memory-current-usage-real: 6.000M
pods-network-wide: Yes
pods-developer: No
pods-tableless-mode: No
pods-light-mode: No
pods-strict: No
pods-allow-deprecated: Yes
pods-api-cache: Yes
pods-shortcode-allow-evaluate-tags: No
sc0ttkclark commented 3 years ago

I have had similar issues when installing the GitHub zip from release/2.8 directly onto the site, and a new update being made available on GitHub during the 2.8 beta. For instance, I had Pods 2.8 Beta 1 installed but Pods 2.8 Beta 2 was committed to GitHub and Git Updater wouldn't show that update available. To debug that at the time, I went to the plugin header and changed the version to 2.7.29 and it also only showed the 2.7.30 as available.

I had to downgrade to an older GHU version that had branch switching to see if manually doing the branch switch to main and back to release/2.8 would resolve this but it doesn't totally. It only updates to that branch once, and future version updates still only show 2.7.30 (from .org) as the only valid option.

afragen commented 3 years ago

Hey Scott,

I'll take a deeper look at this when I get off work. Unfortunately work for the next few days is 7a to 10p.

Stay tuned.

afragen commented 3 years ago

Quick thought. You might need to use a filter to set the branch specifically to the site you're testing.

https://git-updater.com/knowledge-base/developer-hooks/

add_filter( 'gu_set_options',
    function () {
        return array( 
          'current_branch_pods=> 'release/2.8',
        );
    } );

To make Git Updater look to the release/2.8 branch for updates.

Let me know if this works.

afragen commented 3 years ago

Don't change the Primary Branch header for the branch. It should always reflect the same data.

Reset back to Primary Branch: main

sc0ttkclark commented 3 years ago

For our 2.8 RC testing folks, how do they get updates on the correct branch without using the branch switching Pro feature? In the past we used that primary branch to let people download the ZIP from GitHub and install. From there they would get updates.

afragen commented 3 years ago

If you can fix the Primary Branch header and add the filter to that branch, think that will work.

You won't be able to switch branches with the Git Updater PRO plugin but I think we can make it so your beta testers can update.

If you don't have Git Updater PRO, you won't be able to easily switch branches.

You might need to put that filter, correct for each branch, in each branch. Then deleting and installing a new branch should work. I'd need to test.

afragen commented 3 years ago

Have we fixed this?

sc0ttkclark commented 3 years ago

We can close this for now, I'll open something up later if I figure find anything out of place. For now I'm using branch switching and that seems to be working good.