Skip to Content Skip to Menu

Uddeim API Access Using Cron

  • drdehart
  • drdehart
  • OFFLINE
  • Posts: 253
  • Thanks: 2
  • Karma: 1
12 years 8 months ago #195224 by drdehart
Uddeim API Access Using Cron was created by drdehart
Under certain circumstances, notifications are coming through with no domain in the link.

We are using udddeim api in our scripts to send messages.
Basically we do have two different processes for that.
1) When our component based on different user action sends messages - user gets email notification with domain name in the message url (this is good)
2) When script runs through a cron job - in this case we having a problem, user gets email notification without domain name in the message url (this is bad because the link is inactive in this case.)

Can you suggest a solution for us?

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

  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
12 years 8 months ago - 12 years 8 months ago #195266 by slabbi
Replied by slabbi on topic Re: Uddeim API Access Using Cron
The API requires the Joomla Framework, so running the script without the Joomla Framework in the background does not work.

When you enable debugging you should see lots of undefined variables that are defined by Joomla itself.


Nevertheless it seems to be a nice idea to have a stand-alone version of the API.

When you do not need to link to the message itself you could add a static link in the string in the language file.

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer
Last edit: 12 years 8 months ago by slabbi.

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

  • drdehart
  • drdehart
  • OFFLINE
  • Posts: 253
  • Thanks: 2
  • Karma: 1
12 years 8 months ago #195283 by drdehart
Replied by drdehart on topic Re: Uddeim API Access Using Cron
Is there a potential work-around for this? We are using a cron because the messages are event reminders and the cron job runs the script that looks for upcoming events. Is there another approach that you think we should look at?

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

  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
12 years 8 months ago #195284 by slabbi
Replied by slabbi on topic Re: Uddeim API Access Using Cron
You could try following:

Execute following code before you call uddeIM API:
Code:
define( '_JEXEC', 1 ); define( 'JPATH_BASE', realpath(dirname(__FILE__).'/../..' )); define( 'DS', DIRECTORY_SEPARATOR ); require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' ); require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' ); $mainframe =& JFactory::getApplication('site'); $mainframe->initialise();

This initializes the Joomla Framework (should work with Joomla 1.5 but never checked with 1.6 or better).

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 8 months ago #195361 by drdehart
Replied by drdehart on topic Re: Uddeim API Access Using Cron
We tried the code and still get the same results.

We also don't see any errors in the server error logs with or without the code. You mentioned:

When you enable debugging you should see lots of undefined variables that are defined by Joomla itself.


What debugging system are you suggesting? We're trying to troubleshoot, but flying blind at this point.

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 #195596 by drdehart
Replied by drdehart on topic Re: Uddeim API Access Using Cron
any thoughts, Stephan?

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

Moderators: beatnantslabbikrileon
Powered by Kunena Forum