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 #196712 by drdehart
Replied by drdehart on topic Re: Uddeim API Access Using Cron
We aren't only using uddeim in a cron job. 95% of the use is in the normal http mode as users are using the website. The problem with the live_site variable and the recommendation of the CB team is documented in the forum thread I posted (3 times now) - see below (#196613). If you have questions about why CB is recommending against the use of the live_site variable, perhaps that should be taken up with them.

Getting back to our issue, we still need to find a way to make the component work in a cron job. Since the _site_ variable does work in a cron job, we are wondering why this variable is not used in forming the %msglink% variable. This question was not answered as of yet:

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 #196714 by slabbi
Replied by slabbi on topic Re: Uddeim API Access Using Cron
The answer was already given in that thread:

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).

Since URL guessing fails when you call uddeIM from a cron job, you should set $live_site. As you said before, %msglink% (which uses JURI:base()) works when $live_site is set.

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 #196823 by drdehart
Replied by drdehart on topic Re: Uddeim API Access Using Cron
We will try to make the site work with the live_site variable set, but have told you our problem from the posted link and still don't understand why live_site is used instead of _site_, which is known to work in either condition (cron or http). Use of the live_site variable is not advised by the CB team.

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

Moderators: beatnantslabbikrileon
Powered by Kunena Forum