Skip to Content Skip to Menu

Uddeim API Access Using Cron

  • drdehart
  • drdehart
  • OFFLINE
  • Posts: 253
  • Thanks: 2
  • Karma: 1
12 years 7 months ago #196605 by drdehart
Replied by drdehart on topic Re: Uddeim API Access Using Cron
the value in configuration.php is:

var $live_site = '';

we were advised by the CB team to leave this variable empty: ( www.joomlapolis.com/forum/153-profession...site-variable#177543 ).

Is this the configuration you are referring to or some other configuration? Given this is empty, do you still feel your suggestion will work?

Please Log in or Create an account to join the conversation.

  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
12 years 7 months ago #196611 by slabbi
Replied by slabbi on topic Re: Uddeim API Access Using Cron
The link does not work.

Can you check if it works with JURI::root when $live_site is set and when it does not work, if it works with my modification above and the variable set.

I do not see any reason not to set this variable since how should Joomla get the site url when the script is not started by the web server but by a cron job or manually?

I have some sites running and always the variable set without any problems. Nevertheless I have only experiences with smaller sites so CB teams' recommendation might be necessary for complex sites.

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer

Please Log in or Create an account to join the conversation.

  • drdehart
  • drdehart
  • OFFLINE
  • Posts: 253
  • Thanks: 2
  • Karma: 1
12 years 7 months ago #196613 by drdehart
Replied by drdehart on topic Re: Uddeim API Access Using Cron
We tested with the live_site variable set to the domain and the message works properly without the modification you suggested. Here is the link to the previous discussion of the live_site variable with Krileon when we were having trouble with it:

www.joomlapolis.com/forum/153-professional-member-support/177543-livesite-variable#177572

He said:

Never set $live_site unless URL guessing is failing in Joomla (nearly all cases it does not). The $live_site forces the Joomla API to output that exact URL. This means if an extension uses the API and you're on an HTTPS page, but you specified HTTP then it will use HTTP as it's what you specified. CB will not ignore the API and force a scheme (we use JURI::base() for J1.5 and greater).


We don't really want to try second-guessing the CB team, so is there any way to get the message to work without setting the live_site variable. As I mentioned before the _site_ variable does seem to work - can we use that instead of live_site? Any downside to this?

Please Log in or Create an account to join the conversation.

  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
12 years 7 months ago #196614 by slabbi
Replied by slabbi on topic Re: Uddeim API Access Using Cron
URL guessing will fail when called from a cron job, so I see no other way except using $live_site.

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer

Please Log in or Create an account to join the conversation.

  • drdehart
  • drdehart
  • OFFLINE
  • Posts: 253
  • Thanks: 2
  • Karma: 1
12 years 7 months ago #196616 by drdehart
Replied by drdehart on topic Re: Uddeim API Access Using Cron
Do you mean that the _site_ variable relies on URL guessing and for that reason it cannot be used?

Please Log in or Create an account to join the conversation.

  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
12 years 7 months ago #196680 by slabbi
Replied by slabbi on topic Re: Uddeim API Access Using Cron
$live_site will be used when set. In your case URL guessing does not work when you call the framework usign a cron job. So why not using $live_site?

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer

Please Log in or Create an account to join the conversation.

Moderators: beatnantslabbikrileon
Powered by Kunena Forum