xoops forums

Forum Index


Board index » All Posts




Kelico

Just popping in
Posted on: 1/23 9:12
Kelico
Kelico (Show more)
Just popping in
Posts: 2
Since: 1/23 9:03
#61

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

Quote:

safeinsanity wrote:
Ok, this is really strange!

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


Kelico

Just popping in
Posted on: 1/23 9:08
Kelico
Kelico (Show more)
Just popping in
Posts: 2
Since: 1/23 9:03
#62

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

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


geekwright

Quite a regular
Posted on: 1/17 21:49
geekwright
geekwright (Show more)
Quite a regular
Posts: 296
Since: 2010/10/15
#63

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/XoopsModu ... 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.


Lupin

Just popping in
Posted on: 1/17 15:49
Lupin
Lupin (Show more)
Just popping in
Posts: 72
Since: 2007/6/1 2
#64

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



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)


safeinsanity

Just popping in
Posted on: 1/16 21:31
safeinsanity
safeinsanity (Show more)
Just popping in
Posts: 13
Since: 2015/2/5 1
#65

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?


Lupin

Just popping in
Posted on: 1/16 19:34
Lupin
Lupin (Show more)
Just popping in
Posts: 72
Since: 2007/6/1 2
#66

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

TYVM Goffy ,

tomorrow you will have the report.

Pino


goffy

Quite a regular
Posted on: 1/16 19:09
goffy
goffy (Show more)
Quite a regular
Posts: 392
Since: 2010/12/27
#67

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

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


Lupin

Just popping in
Posted on: 1/16 15:34
Lupin
Lupin (Show more)
Just popping in
Posts: 72
Since: 2007/6/1 2
#68

Re: JQuery problems for MAC OS ?

This is : https://xoops.org/modules/newbb/viewtopic.php?post_id=364799


Lupin

Just popping in
Posted on: 1/16 15:30
Lupin
Lupin (Show more)
Just popping in
Posts: 72
Since: 2007/6/1 2
#69

Cannot enter in PUBLISHER module administration ... but "sometimes" ...

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


safeinsanity

Just popping in
Posted on: 1/16 12:09
safeinsanity
safeinsanity (Show more)
Just popping in
Posts: 13
Since: 2015/2/5 1
#70

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 ... 4 5 6 (7) 8 9 10 ... 29272 »