Entry Points in Sugar 5.1
29 Aug, 2008Posted 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:
- 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.
- 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.
- 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: 5.1, code change, custom code
November 29th, 2008 at 8:24 am
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
March 27th, 2009 at 1:24 am
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?
March 31st, 2009 at 8:51 pm
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.
April 2nd, 2009 at 8:30 am
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.
April 2nd, 2009 at 8:31 am
The URL:
http://www.staffingspot.com/empowercsi/SugarCRM/pdf.php?module=JCRMInvoices&action=Print&record=8c125b8f-d480-4c2e-d21e-493028b5287d
should be rewritten to:
http://www.staffingspot.com/empowercsi/SugarCRM/index.php?entrypoint=pdf&module=JCRMInvoices&action=Print&record=8c125b8f-d480-4c2e-d21e-493028b5287d
April 22nd, 2009 at 6:20 am
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