YahnisElsts / plugin-update-checker

A custom update checker for WordPress plugins. Useful if you don't want to host your project in the official WP repository, but would still like it to support automatic updates. Despite the name, it also works with themes.
MIT License
2.22k stars 403 forks source link

Hello, GitHub Deploy tips: what's wrong with insufficient permissions #484

Open muchenkezhan opened 2 years ago

muchenkezhan commented 2 years ago

What's going on? My code is like this require 'include/update/plugin-update-checker.php'; function UpdateCheck($url,$flag = 'qzdy'){ return Puc_v4_Factory::buildUpdateChecker( 'https://github.com/muchenkezhan/wordpress-qzdy-themes', __FILE__, 'qzdy-theme' ); } switch(_qzdy('qzdy_update_source')){ case 'github': $myUpdateChecker = UpdateCheck('https://github.com/muchenkezhan/wordpress-qzdy-themes','qzdy-theme'); break; case 'qzdy': $myUpdateChecker = UpdateCheck('https://www.xxx.cn/details.json'); } In addition to the above code, where else do I need to set? Mine is an open warehouse

muchenkezhan commented 2 years ago

require 'include/update/plugin-update-checker.php'; function UpdateCheck($url,$flag = 'qzdy'){ return Puc_v4_Factory::buildUpdateChecker( 'https://github.com/muchenkezhan/wordpress-qzdy-themes', FILE, 'qzdy-theme' ); } switch(_qzdy('qzdy_update_source')){ case 'github': $myUpdateChecker = UpdateCheck('https://github.com/muchenkezhan/wordpress-qzdy-themes','qzdy-theme'); break; case 'qzdy': $myUpdateChecker = UpdateCheck('https://www.xxx.cn/details.json'); }

muchenkezhan commented 2 years ago

Tips: 更新失败:因为我们不能复制一些文件,升级未被安装。这通常是因为存在不一致的文件权限。

YahnisElsts commented 2 years ago

Sorry, I don't understand what you're asking. What are you trying to do? If it's about that error message, my understanding (based on a Google Translate translation) is that it has to do with file permissions, so it's probably not related to this update checker.

Tip: You post formatted PHP code like this:

```php
//Code here


See this page for more information:
https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks
muchenkezhan commented 2 years ago
require 'include/update/plugin-update-checker.php';
function UpdateCheck($url,$flag = 'qzdy'){
    return Puc_v4_Factory::buildUpdateChecker(
        $url,
        __FILE__,
      $flag
    );
 } 
switch(_qzdy('qzdy_update_source')){
    case 'github':
        $myUpdateChecker = UpdateCheck('https://github.com/muchenkezhan/wordpress-qzdy-themes','qzdy');
        break;
    case 'qzdy':
        $myUpdateChecker = UpdateCheck('https://www.xxx.cn/details.json');
}

Can you help me see if my warehouse has permission problems? I'm not good at GitHub 。 Using GitHub update, in addition to the above code, which code needs to be modified 。

muchenkezhan commented 2 years ago

对不起,我不明白你在问什么。你想做什么?如果是关于那个错误消息,我的理解(基于谷歌翻译)是它与文件权限有关,所以它可能与这个更新检查器无关。

提示:您可以像这样发布格式化的 PHP 代码:

```php
//Code here

有关更多信息,请参阅此页面: [https ://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks)

require 'include/update/plugin-update-checker.php'; function UpdateCheck($url,$flag = 'qzdy'){ return Puc_v4_Factory::buildUpdateChecker( $url, FILE, $flag ); } switch(_qzdy('qzdy_update_source')){ case 'github': $myUpdateChecker = UpdateCheck('https://github.com/muchenkezhan/wordpress-qzdy-themes','qzdy'); break; case 'qzdy': $myUpdateChecker = UpdateCheck('https://www.xxx.cn/details.json'); }


Sorry, I don't understand what you're asking. What are you trying to do? If it's about that error message, my understanding (based on a Google Translate translation) is that it has to do with file permissions, so it's probably not related to this update checker.

Tip: You post formatted PHP code like this:
//Code here


See this page for more information: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks
require 'include/update/plugin-update-checker.php';
function UpdateCheck($url,$flag = 'qzdy'){
    return Puc_v4_Factory::buildUpdateChecker(
        $url,
        __FILE__,
      $flag
    );
 } 
switch(_qzdy('qzdy_update_source')){
    case 'github':
        $myUpdateChecker = UpdateCheck('https://github.com/muchenkezhan/wordpress-qzdy-themes','qzdy');
        break;
    case 'qzdy':
        $myUpdateChecker = UpdateCheck('https://www.xxx.cn/details.json');
}

Can you help me see if my warehouse has permission problems? I'm not good at GitHub 。 Using GitHub update, in addition to the above code, which code needs to be modified 。

YahnisElsts commented 2 years ago

This does not look like a GitHub problem. Based on the error message that you posted earlier, the problem might be something on your WordPress site, such as incorrect file permissions.

Do updates work correctly when you're not using GitHub? If so, are there any differences between the ZIP file that would be downloaded from GitHub and the ZIP file that's specified in details.json?