Sugar Developer Blog

Entry Points in Sugar 5.1

29 Aug, 2008
Posted By: John Mertic

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

Tags: , ,

2 Responses to “Entry Points in Sugar 5.1”

  1. Recent Links Tagged With "points" - JabberTags Says:

    […] public links >> points Entry Points in Sugar 5.1 Saved by Jamesosb on Thu 16-10-2008 Position wanted Saved by thecatkeaton on Wed 15-10-2008 […]

  2. Muthukumar Srinivasan Says:

    i installed Just CRM Timesheet and invoice module. invoices screen has a “view button”. when I click on this, it launches the following

    http://www.staffingspot.com/empowercsi/SugarCRM/pdf.php?module=JCRMInvoices&action=Print&record=8c125b8f-d480-4c2e-d21e-493028b5287d

    when new window is opened, it throws error as below:

    Not A Valid Entry Point

    then I modified as suggested above. I still not able to make this to work.

    Please help

    muthukumar

Leave a Reply

Have feedback for us? Drop us a line.
Terms & Conditions | Privacy | Trademark Info | Contact Info | FAQs | SugarCRM Inc.© 2004 - 2009 All rights reserved.