Posts Tagged ‘custom code’

Entry Points in Sugar 5.1

Friday, August 29th, 2008

One of the many code re-factoring changes we’ve made with Sugar 5.1 is to consolidate the number of entry points into the application as well as rerouting the current entry points through the MVC framework. An entry point is a PHP file that can be called either via URL or command line to actually invoke a Sugar process.  For instance when calling the home page of the application via URL or starting the scheduler via command line.  Consolidating the entry points has also helped us secure the application better and improve quality by making sure each request goes through the same initialization code.

Backwards compatibility with custom code
It does however present some backwards compatibility problems.  Most notably you will need to update your code if you have custom code that relies on a deprecated entry point such as a custom Quote template that may have called pdf.php which is no longer a stand-alone entry point. In these cases, you will need to change the URL reference as described below:

  1. Look for the entry point file name in the include/MVC/Controller/entry_point_registry.php. It will be the in the ‘file’ key in the sub-array.
  2. Make note of the key of that array. So for the pdf.php entry point, it appears in include/MVC/Controller/entry_point_registry.php as:
    'pdf' => array('file' => 'pdf.php', 'auth' => true),

    So we will want to use the ‘pdf’ part in the next step.

  3. Change the URL reference from the current reference to one in the form of:
    index.php?entryPoint=<<entrypoint>>

    So for the above pdf.php example, we would change our references from

    pdf.php

    to:

    index.php?entryPoint=pdf

The only remaining entry points in 5.1 that aren’t using this new index.php URL pattern (and therefore continue to be valid entry points) are:

  • campaign_tracker.php – used by the Campaign Management module for tracking campaign responses. Deprecated as of Sugar 5.1.0.
  • cron.php – used by the Windows Scheduler Service or the cron service on Linux and Unix for executing the Sugar Scheduler periodically.
  • index.php – default entry point into the Sugar application
  • install.php – used for initial install
  • maintenance.php – invoked when the application is down for maintenance.
  • metagen.php - Deprecated as of Sugar 5.1.0.
  • silentUpgrade.php – used for silent installer
  • soap.php – entry point for all SOAP calls
  • vcal_server.php – used for syncing information to Outlook
Have feedback for us? Drop us a line.
Terms & Conditions | Privacy | Trademark Info | Contact Info | FAQs | SugarCRM Inc.© 2004 - 2009 All rights reserved.