Jump to content


X2Raymond

Member Since 09 Dec 2013
Offline Last Active Jul 07 2017 03:15 PM
-----

Posts I've Made

In Topic: Installalling into a VM

06 July 2017 - 11:44 AM

Ah interesting, perhaps plain HTTP is disabled, how about:

netstat -tln | grep :443

If this returns an open port, try to reach your instance by prefixing https:// in front of your VM IP address or domain name.

 

You'll also want to check your Apache error log at /var/log/apache2/error.log for anything interesting.


In Topic: My Cron jobs stopped working

06 July 2017 - 07:48 AM

Hello Eugene,

 

Ah very interesting, would you happen to have some automation system or control panel in place which might manage cronjobs? After configuring the cronjobs from the Cron Table settings page, examine the cron table from the CLI with a command like:

sudo crontab -eu www-data

substituting your web server user as appropriate. Ensure that the X2CRM automation jobs are present in the crontab, then inspect it again later to verify they are still there. You can also try running the console command from within the protected directory manually with:

./yiic cron

If it remains present in the crontab, we can continue by looking into possible errors in the automation methods. You can update the cron jobs to save the output by appending something like " >> ;/tmp/x2cronjob.log". You'll also want to grep your Apache access log for the string "cron" to find the calls to api/cron, and examine the status code, which should be 200.

 

Please let me know what you find and we can continue troubleshooting.

 

Thanks,

Raymond


In Topic: Mouse over - hover notes

05 July 2017 - 01:48 PM

Hi Robert,

 

To enable qtips on Quotes, there are a handful of modifications that will need to be performed:

 

In LinkableBehavior, you'll want to add a custom class to Quote links:

diff --git a/x2engine/protected/components/behaviors/LinkableBehavior.php b/x2engine/protected/components/behaviors/LinkableBehavior.php
index 4183736..fd2c86a 100644
--- a/x2engine/protected/components/behaviors/LinkableBehavior.php
+++ b/x2engine/protected/components/behaviors/LinkableBehavior.php
@@ -197,6 +197,14 @@ class LinkableBehavior extends CActiveRecordBehavior {
                     'class'=>'contact-name'
                 ), $htmlOptions)
             );
+        } else if($this->owner instanceof Quote){
+            return CHtml::link(
+                '<span>'.X2Html::encode($name).'</span>',
+                $url,
+                array_merge (array(
+                    'class'=>'quote-name'
+                ), $htmlOptions)
+            );

Next, you'll need to define a new action to serve the qtip info in the QuotesController:

diff --git a/x2engine/protected/modules/quotes/controllers/QuotesController.php b/x2engine/protected/modules/quotes/controllers/QuotesController.php
index d78811a..240f150 100644
--- a/x2engine/protected/modules/quotes/controllers/QuotesController.php
+++ b/x2engine/protected/modules/quotes/controllers/QuotesController.php
@@ -634,4 +634,9 @@ class QuotesController extends x2base {
     }
 
 
+    public function actionQtip($id) {
+        $quote = $this->loadModel($id);
+
+        $this->renderPartial('qtip', array('quote' => $quote));
+    }

You'll want to define a view at protected/modules/quotes/views/quotes/qtip.php which renders your desired data from the $quote object passed to the view. For testing, I just used a simple view like:

if (isset ($_GET['suppressTitle']) && !$_GET['suppressTitle']) {
?>

<h2><?php echo $quote->renderAttribute('name'); ?></h2>

<?php
}

echo $quote->renderAttribute('name');
echo $quote->renderAttribute('total');

Finally, to enable the qtips on the Quotes grid and in the Process drag and drop interface, you'll need to make two adjustments:

diff --git a/x2engine/protected/modules/quotes/views/quotes/index.php b/x2engine/protected/modules/quotes/views/quotes/index.php
index ee96e4b..6bb913c 100644
--- a/x2engine/protected/modules/quotes/views/quotes/index.php
+++ b/x2engine/protected/modules/quotes/views/quotes/index.php
@@ -62,6 +62,13 @@ $('.search-form form').submit(function(){
 <?php
 $this->widget('X2GridView', array(
        'id'=>'quotes-grid',
+    'enableQtips' => true,
+    'qtipManager' => array(
+        'X2GridViewQtipManager',
+        'loadingText' => addslashes(Yii::t('app', 'loading...')),
+        'qtipSelector' => ".quote-name",
+        'modelType' => "quotes"
+    ),
        'title'=>Yii::t('quotes','{module}',  array('{module}'=>Modules::displayName())),
        'buttons'=>array('advancedSearch','clearFilters','columnSelector','autoResize','showHidden'),
        'template'=> 
diff --git a/x2engine/protected/modules/workflow/assets/js/DragAndDropViewManager.js b/x2engine/protected/modules/workflow/assets/js/DragAndDropViewManager.js
index d37c754..fdb2487 100644
--- a/x2engine/protected/modules/workflow/assets/js/DragAndDropViewManager.js
+++ b/x2engine/protected/modules/workflow/assets/js/DragAndDropViewManager.js
@@ -1511,7 +1511,7 @@ DragAndDropViewManager.prototype._setUpTopScrollbar = function () {
 DragAndDropViewManager.prototype._setUpQtips = function () {
 
     var that = this;
-    $.each (['opportunities', 'contacts', 'accounts'], function (i, type) {
+    $.each (['opportunities', 'contacts', 'accounts', 'quote'], function (i, type) {
         that._qtipManagers[type] = new x2.X2GridViewQtipManager ({
             loadingText: that.translations['Loading...'],

Hope this helps!

 

Raymond


In Topic: Is there any way to set default email format?

05 July 2017 - 08:24 AM

Yes that's correct, currently the email format can only be quickly configured by using Email Templates in the Docs module. However, I can see having a "default" email template, perhaps configured per-user, being useful for many verticals, for example to enable quicker and more consistent responses in a customer support team.


In Topic: You don't have permission to access /x2engine/index.php/users/create on t...

05 July 2017 - 08:20 AM

Ah I see, I believe it may be caused by the web server process being executed by "nobody", and not having write access in the webroot. Depending on the security you require on your server and whether you have other virtual hosts enabled, there are a few options to resolve:

  1. Change the web server process to be executed by the owner of the webroot files ("XXXXX" in the output above). This can be done in the Apache config by updating the "User" and "Group" directives. If this is the only virtual host running on this server, this would be suitable, but if you're running other web apps, it is best to keep strict separation with permissions at a bare minimum.
  2. Give "nobody" permission to write to the webroot, either by changing the ownership of the files in the webroot to be owned by "nobody" (chown -R nobody /path/to/webroot),or by opening up the "other" write permission (not advisable). If you still want to write the webroot files as your user ("XXXXX"), keep group ownership set and add write permission. For further information, please see the "Server Preparation" section of the installations wiki article here: http://wiki.x2crm.co...ver_Preparation
  3. When you are using multiple vhosts, you may wish to have each virtual host executed by a dedicated user. If you're using a PHP application server, like php-fpm, then you'll want to use the appropriate directives for that application to configure the user/group. suexec is another option for Apache for use with mod_fcgid.