Git-updater: Notice: Undefined index: owner_repo in /app/public/wp-content/plugins/github-updater/src/GitHub_Updater/Plugin.php on line 179

Created on 16 Feb 2017  ยท  44Comments  ยท  Source: afragen/git-updater

Hey there

I just installed your plugin in several ways (git clone, zip, composer) and get multiple notices as in the attached file.

github-updater-notices.txt

Most helpful comment

I found the error in our theme.. we use a filter for sanitize_file_name and automatically add a '.' so your sanitize function in Settings.php also added this '.' to the array keys.

The $header array was:
array (size=8)
'scheme.' => string 'https' (length=5)
'host.' => string 'github.com' (length=10)
'path.' => string 'afragen/github-updater-translations' (length=35)
'repo.' => string 'github-updater-translations' (length=27)
'owner.' => string 'afragen' (length=7)
'owner_repo.' => string 'afragen/github-updater-translations' (length=35)
'base_uri.' => string 'https://github.com' (length=18)
'uri.' => string 'https://github.com/afragen/github-updater-translations' (length=54)

Sorry for the effort and thank you very much for your help!

You can close the issue as resolved.

All 44 comments

Other that GHU, what plugins/themes do you have installed that would make use of this plugin?

Can you share the headers of those plugins/themes?

Can you make sure the directory for this plugin is /wp-content/plugins/github-updater

I just installed your plugin as a requirement for wp-sync-db https://github.com/wp-sync-db/wp-sync-db..

my install directory is /wp-content/plugins/github-updater (default)

Very strange. It seems the parse_header_uri() is returning and empty array or similar. I'll add some error checking to remove the notices.

Everything should still be functioning.

cool, thanks alot!

Switch to latest develop branch and let me know if the PHP notice goes away. I don't see it here so difficult to test.

I just pulled your latest changes and sadly the notices didn't disappear.. I actually disabled all other plugins and tried again. Maybe there is a problem with the german version of WP?

That's very odd. Is this happening on a local version of the site?

It seems as though this line, https://github.com/afragen/github-updater/blob/develop/src/GitHub_Updater/Plugin.php#L143 is resulting in $header to have odd data. Can you add a var_dump( $header ); after that line and let me know what the results are?

Re-load the develop branch as I've made another attempt. Use the branch switch and just switch to the develop branch and it will re-install.

yes it's on a local version.. but i also tried on a remote site with the same results..

this is my dump output after the if:
/app/public/wp-content/plugins/github-updater/src/GitHub_Updater/Plugin.php:146:
array (size=8)
'scheme.' => string 'https' (length=5)
'host.' => string 'github.com' (length=10)
'path.' => string 'afragen/github-updater-translations' (length=35)
'repo.' => string 'github-updater-translations' (length=27)
'owner.' => string 'afragen' (length=7)
'owner_repo.' => string 'afragen/github-updater-translations' (length=35)
'base_uri.' => string 'https://github.com' (length=18)
'uri.' => string 'https://github.com/afragen/github-updater-translations' (length=54)

I actually pulled the latest changes from develop, but got the same results... :(

maybe I can help you with this issue, but I just don't know where to start debugging..

Do you have github-updater-translations in your plugins folder?

no, just the github-updater..

On Thu, Feb 16, 2017, 22:37 Andy Fragen notifications@github.com wrote:

Do you have github-updater-translations in your plugins folder?

โ€”
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/afragen/github-updater/issues/529#issuecomment-280469155,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPN_wvKU1buMKy50GzdWdPlR_6NDDGsks5rdMGlgaJpZM4MDZGG
.

--
Wir gehen neue Wege โ€“ kommst du mit? https://faktorvier.ch

FAKTOR VIER GmbH
Tribschenstrasse 42
CH-6005 Luzern

Telefon: +41 41 545 88 99
E-Mail: [email protected]
Web: faktorvier.ch
http://faktorvier.ch/?utm_source=E-Mail%20Signatur&utm_medium=E-Mail&utm_campaign=E-Mail%20Signatur%20Klick


Is that the only output from the var_dump? It's odd that it's showing up there. That only would get called from the Language_Pack class.

Can you also add var_dump( $headers );

yes thats the only output and its var_dump($headers)..

On Thu, Feb 16, 2017, 22:44 Andy Fragen notifications@github.com wrote:

Can you also add var_dump( $headers );

โ€”
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/afragen/github-updater/issues/529#issuecomment-280470896,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPN_3ex5BCjt7jfMaxz6_tB1YqXLpbwks5rdMMjgaJpZM4MDZGG
.

--
Wir gehen neue Wege โ€“ kommst du mit? https://faktorvier.ch

FAKTOR VIER GmbH
Tribschenstrasse 42
CH-6005 Luzern

Telefon: +41 41 545 88 99
E-Mail: [email protected]
Web: faktorvier.ch
http://faktorvier.ch/?utm_source=E-Mail%20Signatur&utm_medium=E-Mail&utm_campaign=E-Mail%20Signatur%20Klick


I'm asking for

var_dump( $header );
var_dump( $headers );

ah sorry.. thats the output of both (first $header, second $headers):

/app/public/wp-content/plugins/github-updater/src/GitHub_Updater/Plugin.php:146:
array (size=8)
'scheme.' => string 'https' (length=5)
'host.' => string 'github.com' (length=10)
'path.' => string 'afragen/github-updater' (length=22)
'repo.' => string 'github-updater' (length=14)
'owner.' => string 'afragen' (length=7)
'owner_repo.' => string 'afragen/github-updater' (length=22)
'base_uri.' => string 'https://github.com' (length=18)
'uri.' => string 'https://github.com/afragen/github-updater' (length=41)
/app/public/wp-content/plugins/github-updater/src/GitHub_Updater/Plugin.php:147:
array (size=32)
'Requires WP' => string '4.0' (length=3)
'Requires PHP' => string '5.3' (length=3)
'Release Asset' => string '' (length=0)
'GitHub Plugin URI' => string 'https://github.com/afragen/github-updater' (length=41)
'GitHub Branch' => string 'develop' (length=7)
'GitHub Enterprise' => string '' (length=0)
'GitHub CE' => string '' (length=0)
'GitHub Languages' => string 'https://github.com/afragen/github-updater-translations' (length=54)
'GitHub CI Job' => string '' (length=0)
'Bitbucket Plugin URI' => string '' (length=0)
'Bitbucket Branch' => string '' (length=0)
'Bitbucket Enterprise' => string '' (length=0)
'Bitbucket CE' => string '' (length=0)
'Bitbucket Languages' => string '' (length=0)
'Bitbucket CI Job' => string '' (length=0)
'GitLab Plugin URI' => string '' (length=0)
'GitLab Branch' => string '' (length=0)
'GitLab Enterprise' => string '' (length=0)
'GitLab CE' => string '' (length=0)
'GitLab Languages' => string '' (length=0)
'GitLab CI Job' => string '' (length=0)
'Name' => string 'GitHub Updater' (length=14)
'PluginURI' => string 'https://github.com/afragen/github-updater' (length=41)
'Version' => string '6.2.2.1' (length=7)
'Description' => string 'A plugin to automatically update GitHub, Bitbucket, or GitLab hosted plugins, themes, and language packs. It also allows for remote installation of plugins or themes into WordPress.' (length=181)
'Author' => string 'Andy Fragen' (length=11)
'AuthorURI' => string '' (length=0)
'TextDomain' => string 'github-updater' (length=14)
'DomainPath' => string '/languages' (length=10)
'Network' => boolean true
'Title' => string 'GitHub Updater' (length=14)
'AuthorName' => string 'Andy Fragen' (length=11)

I think I found the issue. I pushed a commit to latest develop branch. Can you re-install and check?

If you're still having this issue can you post another stack trace?

nope, sadly not..
here are my notices..

github-updater-notices.txt

Can you try deactivating all plugins except GitHub Updater an wp-sync-db? Still get errors?

here's my dump output

/app/public/wp-content/plugins/github-updater/src/GitHub_Updater/Plugin.php:181:
array (size=8)
'scheme.' => string 'https' (length=5)
'host.' => string 'github.com' (length=10)
'path.' => string 'afragen/github-updater' (length=22)
'repo.' => string 'github-updater' (length=14)
'owner.' => string 'afragen' (length=7)
'owner_repo.' => string 'afragen/github-updater' (length=22)
'base_uri.' => string 'https://github.com' (length=18)
'uri.' => string 'https://github.com/afragen/github-updater' (length=41)

I already disabled all other plugins instead of github-updater..

That should be correct. But you should have another dump for the other plugin.

Do you still have PHP errors with this?

Can you install Query Monitor? Does it show any errors?

What page are you viewing?

GHU is the only plugin I activated. Now I installed Query Monitor and it gets me two 404 Not Found errors. Both are GET https://api.github.com/repos///contents/github-updater.php

Here's the error stack:
WP_Http->request()
wp-includes/class-http.php:223
WP_Http->get()
wp-includes/class-http.php:593
wp_remote_get()
wp-includes/http.php:170
Fragen\GitHub_Updater\API->api()
wp-content/plugins/github-updater/src/GitHub_Updater/API.php:151
Fragen\GitHub_Updater\GitHub_API->get_remote_info()
wp-content/plugins/github-updater/src/GitHub_Updater/GitHub_API.php:51
Fragen\GitHub_Updater\Base->get_remote_repo_meta()
wp-content/plugins/github-updater/src/GitHub_Updater/Base.php:468
Fragen\GitHub_UpdaterPlugin->get_remote_plugin_meta()
wp-content/plugins/github-updater/src/GitHub_Updater/Plugin.php:232
Fragen\GitHub_Updater\Base->forced_meta_update_plugins()
wp-content/plugins/github-updater/src/GitHub_Updater/Base.php:302
Fragen\GitHub_Updater\Base->init()
wp-content/plugins/github-updater/src/GitHub_Updater/Base.php:261
do_action('init')
wp-includes/plugin.php:453

I view the installed plugins page in the backend.

Thanks. I think I know what to fix now. Stay tuned.

I think it's now fixed. ๐Ÿคž

Something looks really strange in your last stack trace. It seems that something deeper is happening, but I can't be sure. Can you create a clean local installation and see if you can duplicate this error?

yes sure, I'll try and let you know..

On Fri, Feb 17, 2017, 20:09 Andy Fragen notifications@github.com wrote:

Something looks really strange in your last stack trace. It seems that
something deeper is happening, but I can't be sure. Can you create a clean
local installation and see if you can duplicate this error?

โ€”
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/afragen/github-updater/issues/529#issuecomment-280739121,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPN_ybQjtJcCi6IKOaUYeJi-M7RutFxks5rdfB5gaJpZM4MDZGG
.

--
Wir gehen neue Wege โ€“ kommst du mit? https://faktorvier.ch

FAKTOR VIER GmbH
Tribschenstrasse 42
CH-6005 Luzern

Telefon: +41 41 545 88 99
E-Mail: [email protected]
Web: faktorvier.ch
http://faktorvier.ch/?utm_source=E-Mail%20Signatur&utm_medium=E-Mail&utm_campaign=E-Mail%20Signatur%20Klick


Also try clearing the GHU cache.

hmm.. it seems to work on a fresh install in english but not on our basic
install.. clearing the GHU cache didn't fix the notices. I try to figure
out on my own..

On Fri, Feb 17, 2017 at 8:27 PM, Andy Fragen notifications@github.com
wrote:

Also try clearing the GHU cache.

โ€”
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/afragen/github-updater/issues/529#issuecomment-280743598,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPN_9xwvyhi-Qq7XhVJWMO6Kw4Nutf5ks5rdfSrgaJpZM4MDZGG
.

--


Marcel Imper

E-Mail: [email protected]
Mobile: +41 76 399 32 75


--
Wir gehen neue Wege โ€“ kommst du mit? https://faktorvier.ch

FAKTOR VIER GmbH
Tribschenstrasse 42
CH-6005 Luzern

Telefon: +41 41 545 88 99
E-Mail: [email protected]
Web: faktorvier.ch
http://faktorvier.ch/?utm_source=E-Mail%20Signatur&utm_medium=E-Mail&utm_campaign=E-Mail%20Signatur%20Klick


What's in your basic install?

just a wordpress in german, a few plugins and our own theme with child
theme.. nothing really special.. and for testing purposes I deactivated all
other plugins..

On Fri, Feb 17, 2017, 21:18 Andy Fragen notifications@github.com wrote:

What's in your basic install?

โ€”
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/afragen/github-updater/issues/529#issuecomment-280755652,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPN_2ymj1NC1B3K9V-M6j8qRl59NEkVks5rdgCKgaJpZM4MDZGG
.

--
Wir gehen neue Wege โ€“ kommst du mit? https://faktorvier.ch

FAKTOR VIER GmbH
Tribschenstrasse 42
CH-6005 Luzern

Telefon: +41 41 545 88 99
E-Mail: [email protected]
Web: faktorvier.ch
http://faktorvier.ch/?utm_source=E-Mail%20Signatur&utm_medium=E-Mail&utm_campaign=E-Mail%20Signatur%20Klick


I'll see if I can replicate locally.

I try the whole thing in a flywheel local environment.. I also tried on a
remote site, but not via git clone..

On Fri, Feb 17, 2017, 21:45 Andy Fragen notifications@github.com wrote:

I'll see if I can replicate locally.

โ€”
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/afragen/github-updater/issues/529#issuecomment-280761542,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPN_4S0LmyoBAoSqMyNZGzeSyuFshO0ks5rdgbNgaJpZM4MDZGG
.

--
Wir gehen neue Wege โ€“ kommst du mit? https://faktorvier.ch

FAKTOR VIER GmbH
Tribschenstrasse 42
CH-6005 Luzern

Telefon: +41 41 545 88 99
E-Mail: [email protected]
Web: faktorvier.ch
http://faktorvier.ch/?utm_source=E-Mail%20Signatur&utm_medium=E-Mail&utm_campaign=E-Mail%20Signatur%20Klick


I also use Local by Flywheel. I created a local German installation, added GitHub Updater and Query Monitor only. I see no errors. Is it possible for you to send me or give URIs for your own plugins/themes to completely duplicate?

If you change the default language in the English installation, where you don't see an issue, to German, do you see any errors?

I found the error in our theme.. we use a filter for sanitize_file_name and automatically add a '.' so your sanitize function in Settings.php also added this '.' to the array keys.

The $header array was:
array (size=8)
'scheme.' => string 'https' (length=5)
'host.' => string 'github.com' (length=10)
'path.' => string 'afragen/github-updater-translations' (length=35)
'repo.' => string 'github-updater-translations' (length=27)
'owner.' => string 'afragen' (length=7)
'owner_repo.' => string 'afragen/github-updater-translations' (length=35)
'base_uri.' => string 'https://github.com' (length=18)
'uri.' => string 'https://github.com/afragen/github-updater-translations' (length=54)

Sorry for the effort and thank you very much for your help!

You can close the issue as resolved.

It's those small little things that get really aggravating. Glad you found it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pnoeric picture pnoeric  ยท  9Comments

tdavidrussell picture tdavidrussell  ยท  4Comments

soderlind picture soderlind  ยท  10Comments

hell-w-rld picture hell-w-rld  ยท  7Comments

blachawk picture blachawk  ยท  12Comments