• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 12 posts ] 
Author Message
 Post subject: [solved] CmsJobManager on SSL/HTTPS website
PostPosted: Sat Mar 18, 2017 5:51 pm 
Offline
Power Poster
Power Poster

Joined: Sun Apr 19, 2009 9:33 am
Posts: 1146
I was trying to add some News message with status unpublished/draft. I found out that CreateDraftAlertTask (Background Job Manager : News\CreateDraftAlertTask) was not triggered correctly on a site running SSL.

Admin Log:
CmsJobManager Received 400 response when trying to trigger async processing

On CmsJobManagerModule.php the $scheme is set to 'https' but the $prefix_scheme always stays null.

Code:
    $scheme = $url_ob->get_scheme();
 
        $prefix_scheme = null;
        if( !$scheme ) {
            $url_ob->set_scheme('http');
            $scheme = 'http';
            if( CmsApp::get_instance()->is_https_request() ) {
                $url_ob->set_scheme('https');
                $scheme = $prefix_scheme = 'ssl://';
            }
        }

....

        try {
            $fp = fsockopen($prefix_scheme.$url_ob->get_host(),$url_ob->get_port(),$errno,$errstr,3);


Sites running https:// needs more testing.

BTW tryed this out with a self-signed SSL certificate first but it also happened on a live site with valid Letś Encrypt Certificate.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: CmsJobManager on SSL/HTTPS website
PostPosted: Sat Mar 18, 2017 6:37 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 7795
Location: Fernie British Columbia, Canada
I just added some debug statements, and tested this on a server with a letsencrypt certificate. it worked here.

Looking at the code, the only way that prefix_scheme would not be set on an HTTPS request is if the CmsApp::is_http_request() method returned FALSE.

That function is quite simple, and has been unchanged for years.

Code:
public function is_https_request()
{
    if( isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != 'off' ) return TRUE;
        return FALSE;
}


so, that tells me that there is something non-standard about your environment.

Can you (when using an HTTPS request) debug your $_SERVER variable.


Code:
<pre>{$smarty.server|@print_r}</pre>   
will work in any content page.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: CmsJobManager on SSL/HTTPS website
PostPosted: Sat Mar 18, 2017 6:52 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 7795
Location: Fernie British Columbia, Canada
Correction...

I've found a logic error, and fixed that routine. Testing now.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: CmsJobManager on SSL/HTTPS website
PostPosted: Sat Mar 18, 2017 7:00 pm 
Offline
Power Poster
Power Poster

Joined: Sun Apr 19, 2009 9:33 am
Posts: 1146
Okey great.

- function is_https_request gives TRUE at my side.
- do not see anything strange when outputing: {$smarty.server|@print_r}

Will test on svn trunk also.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: CmsJobManager on SSL/HTTPS website
PostPosted: Sat Mar 18, 2017 7:15 pm 
Offline
Power Poster
Power Poster

Joined: Sun Apr 19, 2009 9:33 am
Posts: 1146
Seems to work while testing at revision 11179:

Admin log shows:
CmsJobManager Processed Job News\CreateDraftAlertTask

And the alert is showing up:

Unapproved News articles
You have 3 that is/are not published


Ad1) After publishing the 3 articles the CmsJobManager triggered again but the alert was not cleared out. Not sure if this is the correct behaviour.

arnoud CmsJobManager Found nothing to do 18 Mar. 2017 20:17:25
CmsJobManager Processed Job News\CreateDraftAlertTask 18 Mar. 2017 20:14:03


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: CmsJobManager on SSL/HTTPS website
PostPosted: Sat Mar 18, 2017 7:35 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 7795
Location: Fernie British Columbia, Canada
The alerts do not clear out by themselves. You have to manually clear them.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [fixed] CmsJobManager on SSL/HTTPS website
PostPosted: Sun Mar 19, 2017 6:52 pm 
Offline
Power Poster
Power Poster

Joined: Sun Apr 19, 2009 9:33 am
Posts: 1146
Correct the alerts can be cleared out manually.

Something weird again while looking at the JobManager with Rev 11184.

I placed a few news items to draft mode again but I only get a 302 response code in the Admin Log's:

Code:
192.168.2.16    arnoud         CmsJobManager    Received 302 response when trying to trigger async processing


Should I do a fresh installation and or are you still working on background job stuff? See "ReduceAdminlogTask" added.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [open] CmsJobManager on SSL/HTTPS website
PostPosted: Tue Mar 21, 2017 9:35 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 7795
Location: Fernie British Columbia, Canada
A 302 issue probably has more to do with your configuration than with the job manager stuff.

Do you have a mixed http/https site? these days that's probably a bad idea. On the frontend are some pages secure, and others not?

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [open] CmsJobManager on SSL/HTTPS website
PostPosted: Tue Mar 21, 2017 9:42 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 7795
Location: Fernie British Columbia, Canada
Also check your .htaccess for rewrite rules.

CMSMS will use the default pageid when building the action url for the asynchronous processing. If for some reason your site is setup so that every access to the default URL of your site results in a 302 then that would also cause the issue you are seeing.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [open] CmsJobManager on SSL/HTTPS website
PostPosted: Sat Mar 25, 2017 12:06 pm 
Offline
Power Poster
Power Poster

Joined: Sun Apr 19, 2009 9:33 am
Posts: 1146
I tested with a clean cmsms-beta installation without pretty_urls or .htaccess modifications. Will dig into this a bit deeper (print stuff to the admin log) for verification.

Will get back on this later.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [open] CmsJobManager on SSL/HTTPS website
PostPosted: Sat Mar 25, 2017 2:50 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 7795
Location: Fernie British Columbia, Canada
On my brand new 2.2-beta2 install on HTTPS it works as expected (Including CmsJobManager).

I tested this morning, yesterday we played with certificates and IPv6 configuration because we were having lots of problems on the CMSMS servers.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [open] CmsJobManager on SSL/HTTPS website
PostPosted: Sat Mar 25, 2017 8:01 pm 
Offline
Power Poster
Power Poster

Joined: Sun Apr 19, 2009 9:33 am
Posts: 1146
https on cmsmadesimple.org domains looks good. Last week I spotted problems on my ipad and android phone these are solved.

This item can be closed. I did a fresh installation from Rev: 11193 and I don't see anything weird with the jobmanager.

Thank you for your attention.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 12 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting