I am developing activecollab custom module; facing an issue related to Routers.
I by mistake type wrong action name in Router's action where we need to define in router, but after getting error I updated that action name but activecollabs still reading a previous action i removed files from cache and complie folders but reading previous action.
please share if you ever face this problem in development of activecollab module..
By mistake I did this: (action=>'views')
Router::map('mymodule_view', 'mymodule/view/:request_id', array('controller' => 'mymodule', 'action' => 'views' ), array('req_id' => Router::MATCH_ID) );
but after getting error i update above code by this: (action=>'views')
Router::map('mymodule_view', 'mymodule/view/:request_id', array('controller' => 'mymodule', 'action' => 'view' ), array('req_id' => Router::MATCH_ID) );
First, make sure that your system is in development mode. Open config/config.php and confirm that APPLICATION_MODE is set to in_development:
define('APPLICATION_MODE', 'in_development');
Now that you have that covered, go to activeCollab and you'll have Developer toolbar available in the lower right corner of the application interface, next to activeCollab powered button (it has a red bug icon). Use this tool to clear cache, rebuild images etc.
PS: You can also clear all files from /cache folder, just in case.
Related
I have been brainstorming for a while now on this and finally i decided to put a question here.
I am using PayPal-PHP-SDK (restAPI) for processing payments. And i cannot make it go to the live endpoint (api.paypal.com) and always goes to sandbox (api.sandbox.paypal.com)
Progress: Using the sandbox credentials (clientId and clientSecret) in 'bootstarp.php' and 'mode' set to 'sandbox' in 'sdk_config.ini' i have successfully completed multiple sandbox transactions and completed all other parts of the project. Now the only part is making it live, which is in fact turning out to be the Achilles heel of the project.
What i have tried: I have replaced the sandbox credentials with the live ones from the client. Which he got from https://developer.paypal.com/webapps/developer/applications/myapps then under the app clicking 'show' Live Credentials. I also changed the mode to live in 'sdk_config.ini'. But still it takes me to the sandbox endpoint.
EDIT: while creating the api context in bootstarp.php there is a mode i have also set that to live, code below.
$apiContext->setConfig(
array(
'mode' => 'live',
'http.ConnectionTimeOut' => 30,
'log.LogEnabled' => true,
'log.FileName' => '../PayPal.log',
'log.LogLevel' => 'FINE',
'validation.level' => 'log'
)
);
Can anyone suggest me what i am missing here as i get no error to debug and look further. For any help or advice, thanks in advance.
Have you changed the mode in bootstrap.php? It seems you can use either the configuration in bootstrap.php or in the sdk_config.ini file but not both. Make sure mode is set to live in the bootstrap.php file if you have the sdk_config.ini path commented out as below (from the bootstrap.php file)
// Register the sdk_config.ini file in current directory
// as the configuration source.
/*
if(!defined("PP_CONFIG_PATH")) {
define("PP_CONFIG_PATH", __DIR__);
}
*/
This is probably more appropriate as a comment on Mike Miller's solution but I don't have enough rep, sorry.
I moved from the Paypal API sandbox to live literally five minutes ago, using your question and Mike's answer for information on how to do so.
The only things I changed were the values of clientId and clientSecret in bootstrap.php, and the mode (from 'sandbox' to 'live'), just like you set out in the question. I didn't edit the 'sdk_config.ini' file at all, and the path is commented out anyway, as per Mike's answer.
I note you're referring to the 'bootstrap.php' file as 'bootstarp.php' - this doesn't have anything to do with it, does it?
I had the same problem that I couldn't fix.
I'm not proud of my solution because it's not elegant at all, but it worked to start selling.
I modified the file PayPalConstants.php (located in ...\PayPal-PHP-SDK\paypal\rest-api-sdk-php\lib\PayPal\Core\PayPalConstants.php)
I just changed sandbox routes for live routes:
const REST_SANDBOX_ENDPOINT = "https://api.paypal.com/";
const OPENID_REDIRECT_SANDBOX_URL = "https://www.paypal.com/webapps/auth/protocol/openidconnect";
When I forget to translate something, somewhere Project VIEW, I change the file /app/Locale/por/LC_MESSAGES/default.po and sending it back to the server.
But mostly, this 'new translation', takes HOURS to be viewed, in short: I just send the file, cleaned the cache and browser CakePHP, press F5, and ... NOTHING HAPPENS.
For what reason?
[EDIT]
<?php echo $this->Form->input('Item.0.description', array('label' => false,
'class' => 'span12', 'div' => array('class' => 'span7'), 'rows' => 3,
'placeholder' => __('Type the description'))); ?>
To force the language to update you can clear the persistent and models directories in the /tmp/cache directory. If view caching is enabled you'll have to clean out views as well.
Caching is disabled when debug is set to 2 (which is the value for using the framework during development) and the persistent directory is populated with new cache files, overwriting the old ones each time a view is loaded. So the debug switch and subsequent browser refresh might clean the old language files for you.
I found a strange solution:
I set (app/Config/core.php)...
Configure::write('debug', 2); // It was 0
Press, F5... wait... and works.
Later, I back...
Configure::write('debug', 0);
Press F5 again, and works.
Why? I no have idea.
Even if Configure::write('debug', 2); I recommend to delete the remote folder containing the translations, refresh with browser (to state that nothing is translated anymore) then reupload the translations folder.
Works perfectly that way for me.
I migrated a cake website from one server to another, but in statics pages is showing a blank page, this is happening in two case scenarios right now
Scenario1:
$this->redirect(Router::url(array('controller' => 'staticpages',
'action' => 'message', 'messageSlug' => 'welcome')));
Scenario2:
$link = Router::url(array('controller' => 'staticpages',
'action' => 'message', 'messageSlug' => 'thanks-for-registering'));
The Facebook PHP SDK is interfering. It's probably throwing an error before Cake can properly redirect (the headers are already sent by groofi__extra_facebook.php.
Have a look what's happening in groofi__extra_facebook.php where the error seems to be stemming from. Probably your new server configuration is missing a vital component, is cURL present, for example?
I am consistently getting an error when navigating between CakePHP plugins (that I coded).
I bootstrap them like this:
CakePlugin::loadAll(array(
'OneTime' => array('bootstrap' => true),
'Mango' => array('bootstrap' => true),
'Intercape' => array('bootstrap' => true)
));
I link to them like this:
echo $this->Html->link($image,array('plugin'=>'intercape','controller'=>'tickets','action'=>'StepOne','agent'=>FALSE),array('escape'=>FALSE));
echo $this->Html->link($image,array('plugin'=>'mango','controller'=>'tickets','action'=>'StepOne','agent'=>FALSE),array('escape'=>FALSE));
I can clear my cache and navigate to a plugin, but if I use a link like the following one to go to the home page then the next time I try to click the other link I get a bug.
Clicking this link
echo $this->Html->link($image,array('plugin'=>'','controller'=>'agentusers','action'=>'dashboard','agent'=>TRUE), array('escape'=>FALSE));
gives this bug the next time I click the Intercape link (not the Mango link)
Fatal error: Class 'MangoAppController' not found in /var/www/mtn/app/Plugin/Mango/Controller/TicketsController.php on line 12
I have checked that Intercape does not reference Mango anywhere. Clearing my cache lets me click Intercape and use the plugin, but then Mango won't work.
It turns out that the problem was in using the same controller name in different plugins.
Cake was caching where to look for controller source across plugin requests and so was looking for the wrong code.
Renaming the controller solved the problem, but made the URL's a bit messy :(
I am trying to override the default Sugar5 theme and I believe it worked. But its not picking up on my css. My theme directory looks like this
themes/mytheme
themes/mytheme/themedef.php
themes/mytheme/css/
themes/mytheme/css/style.css
themes/mytheme/themedef.php
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
[ legal boiler plate removed ]
********************************************************************************/
$themedef = array(
'parentTheme' => "Sugar5",
'name' => "mytheme",
'description' => "Enhanced Brands",
'version' => array(
'regex_matches' => array('6\.*.*'),
),
);
But its not picking up on my css folder
So I went into config.php and changed the default_theme to mytheme
Still nothing. any ideas whats next ??
First off, you'll want to do a 'Quick Rebuild and Repair' in the Admin -> Repair section to pick up your new theme and any changes to it. Also, clearing out your browser cache will help as well.
Also, make sure the permission on your css file and css/ folder both allow read access to the webserver user.
some suggestions:
Isn't the parentTheme called "Classic"? (And not "Sugar5")
Rebuild SugarCRM via the admin->Repair to rebuild files
Make sure you clean any browser cache (since css usually are cached)
Enable developer mode in Sugar to disable any caching
Use Firebug or similar to ensure the css is loaded properly
Hope it helps.
#Kåre W. Storgaard /themes/Sugar5 is the correct theme to be changing code wise, its called "Classic" in the Interface.
However you really shouldn't be doing it in the /themes folder as this may be over written in future updates.
Instead copy the classic theme to /custom/themes/{your new theme name}, then switch the theme over to it in the user control panel.
Another thing to watch is some css in the default theme is declared twice!