1621
Kelico
Re: Getting a "403 Access denied" error when trying to access the Private Messages module
  • 2020/1/23 9:12

  • Kelico

  • Just popping in

  • Posts: 2

  • Since: 2020/1/23


Quote:

safeinsanity wrote:
Ok, this is really strange!

I just sent myself a PM. How is that even possible?
Weird



1622
Kelico
Re: Getting a "403 Access denied" error when trying to access the Private Messages module
  • 2020/1/23 9:08

  • Kelico

  • Just popping in

  • Posts: 2

  • Since: 2020/1/23


I think it's a bug because is not supposed to be



1623
geekwright
Re: Cannot enter in PUBLISHER module administration ... but "sometimes" ...

I had not realized the new module code was doing this. Cool feature.

I've got a few thoughts.

Looks like we should be checking the CURLINFO_RESPONSE_CODE with curl_getinfo() to make sure the return is a 200. A lot of other codes can be returned with a valid json body that are totally different than the releases body. An example is the 403 response code for a rate limit exceded error - https://developer.github.com/v3/#rate-limiting

We might also consider a more precise end point, like this:
https://api.github.com/repos/XoopsModules25x/publisher/releases/latest

To be good github citizens, we should cache the results for some period of time so we don't generate hundreds of checks while doing publisher setup activities. The period could easily be an hour or more. Xmf\Module\Helper\Cache::cacheRead() could make that easy.

One last observation not directly related to this issue, since publisher can be cloned, it looks like this check will not get any data, or wrong data from another module.



1624
Lupin
Re: Cannot enter in PUBLISHER module administration ... but "sometimes" ...
  • 2020/1/17 15:49

  • Lupin

  • Just popping in

  • Posts: 92

  • Since: 2007/6/1 2




Unfortunately the problem has been repeated ... the two errors (the same) have only moved to lines 127 and 128 ...

Quote:
Notice: Trying to get property 'tag_name' of non-object in file /modules/publisher/class/Common/VersionChecks.php line 127 Error: Error: Cannot use object of type stdClass as array in file /modules/publisher/class/Common/VersionChecks.php line 128


Here the mod.

(#100)
public static function checkVerModule($helper$source 'github'$default 'master')
    {
        
$moduleDirName      basename(dirname(dirname(__DIR__)));
        
$moduleDirNameUpper mb_strtoupper($moduleDirName);
        
$update             '';
        
$repository         'XoopsModules25x/' $moduleDirName;
        
//        $repository         = 'XoopsModules25x/publisher'; //for testing only
        
$ret             '';
        
$infoReleasesUrl "https://api.github.com/repos/$repository/releases";
        if (
'github' === $source) {
            if (
function_exists('curl_init') && false !== ($curlHandle curl_init())) {
                
curl_setopt($curlHandleCURLOPT_URL$infoReleasesUrl);
                
curl_setopt($curlHandleCURLOPT_RETURNTRANSFERtrue);
                
curl_setopt($curlHandleCURLOPT_SSL_VERIFYPEERfalse);
                
curl_setopt($curlHandleCURLOPT_HTTPHEADER, ["User-Agent:Publisherrn"]);
                
$curlReturn curl_exec($curlHandle);
                if (
false === $curlReturn) {
                    
trigger_error(curl_error($curlHandle));
                } elseif (
false !== strpos($curlReturn'Not Found')) {
                    
trigger_error('Repository Not Found: ' $infoReleasesUrl);
                } else {
                    
$file              json_decode($curlReturnfalse);
                      
/* nuovo if */
                    
if (json_last_error() !== JSON_ERROR_NONE) {
                        
curl_close($curlHandle);
                        return [];
                    } 
/* fine nuovo if */
                    
$latestVersionLink sprintf("https://github.com/$repository/archive/%s.zip"$file reset($file)->tag_name $default);
                    
$latestVersion     $file[0]->tag_name;
                    
$prerelease        $file[0]->prerelease;
(
#129)



1625
safeinsanity
Re: Getting a "403 Access denied" error when trying to access the Private Messages module

Ok, this is really strange!

I uninstalled the PM module and completely deleted it from my xoops installation's directory via ftp and now it seems to be working. I just sent myself a PM. How is that even possible?



1626
Lupin
Re: Cannot enter in PUBLISHER module administration ... but "sometimes" ...
  • 2020/1/16 19:34

  • Lupin

  • Just popping in

  • Posts: 92

  • Since: 2007/6/1 2


TYVM Goffy ,

tomorrow you will have the report.

Pino



1627
goffy
Re: Cannot enter in PUBLISHER module administration ... but "sometimes" ...
  • 2020/1/16 19:09

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


Hi Pino

it seems that sometimes connection to github is failing.
Please goto file /modules/publisher/class/Common/VersionChecks.php line 122 and add following if-condition:
$file              json_decode($curlReturnfalse);
                    if (
json_last_error() !== JSON_ERROR_NONE) {
                        
curl_close($curlHandle);
                        return [];
                    }


let me know whether this fix your problem.

goffy



1628
Lupin
Re: JQuery problems for MAC OS ?
  • 2020/1/16 15:34

  • Lupin

  • Just popping in

  • Posts: 92

  • Since: 2007/6/1 2





1629
Lupin
Cannot enter in PUBLISHER module administration ... but "sometimes" ...
  • 2020/1/16 15:30

  • Lupin

  • Just popping in

  • Posts: 92

  • Since: 2007/6/1 2


OK, this is really strange ...

Sometimes (without any apparent connection with times or activities ...) we are unable to enter the module administration (version 1.07 final, xoops 2.5.10).
It almost always happens after inserting new categories or items ... but I'm almost sure that it is purely random.
Given the frequency of the problem I activated the debugging and here I report what I read:
1) on the web page: Error : Error: Cannot use object of type stdClass as array
2) in debugging: Errors
Notice: Trying to get property 'tag_name' of non-object in file /modules/publisher/class/Common/VersionChecks.php line 122
Error: Error: Cannot use object of type stdClass as array in file /modules/publisher/class/Common/VersionChecks.php line 123


One question: is it possible to know when the last modification was made to the module?

Thank you

Pino



1630
safeinsanity
Weblog Version: 1.47 Beta 1

Module installs on xoops 2.5.10 but unable to create new categories and module's index page is a blank white page with Internal Server Error:

A problem has occurred on our server!
Page is currently unavailable
We are working on a fix
Please come back soon ...

Error : Error: Call to undefined method WeblogCategory::WeblogCategoryBase()




TopTop
« 1 ... 160 161 162 (163) 164 165 166 ... 29425 »



Login

Who's Online

578 user(s) are online (309 user(s) are browsing Support Forums)


Members: 0


Guests: 578


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits