Entry Points in Sugar 5.1

bsoremsugar —  August 29, 2008 — 13 Comments

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

13 responses to Entry Points in Sugar 5.1

  1. 

    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

  2. 

    Yea the problem exists also in my invoice module and I got a brand new installed SugarCRM 5.2. Is this error also in the Professional Edition?

  3. 

    This isn’t really helpful. Your own documentation is now wrong: http://www.sugarcrm.com/wiki/index.php?title=“Not_a_valid_entry_point”_errors_after_upgrading_to_5.1.

    Your ‘cleaning up code’ has made the web-to-lead feature unusable. I’m not going to debug not a valid entry point errors: you need to provide proper instructions for how to fix it.

  4. 

    The way to fix this would be to change any links like this:

    http://hostname/WebToLeadCapture.php

    to:

    http://hostname/index.php?entryPoint=WebToLeadCapture

    Also, the file WebToLeadCapture.php that was in the root directory is now located in the modules/Campaigns/WebToLeadCapture.php. The previous file is still there, but just redirects to the correct place.

  5. 

    After upgrading from 5.0 to 5.1, I tried making the following changes in the url that my website calls to capture leads but now I get this message:

    We are sorry, the server is currently unavailable, please try again later.

    Are there any other changes that I have to make?

    I followed these directions from an earlier post when making the change:

    The way to fix this would be to change any links like this:
    http://hostname/WebToLeadCapture.php
    to:
    http://hostname/index.php?entryPoint=WebToLeadCapture

  6. 
    Francis Derequito May 13, 2013 at 9:26 pm

    what’s the difference when having it false as it’s default instead of true?.. because what I can see in most of the entry_points are false..

Trackbacks and Pingbacks:

  1. Access same functions as SOAPwebservice directly from sugar classes or sql when local - April 26, 2012

    [...] [...]

  2. SugarCRM Developer Blog » Blog Archive » Adding entrypoints via the Ext framework in a package - October 18, 2012

    [...] long time ago we had a post on adding new entrypoints ( one of my first posts on this very blog ), and back then there wasn’t a very clean way to [...]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s