WordPress.org

Ready to get started?Download WordPress

Forums

Gravity Forms CapsuleCRM Add-on
[resolved] Broken, lots of fatal errors (syntax, coding etc.) (14 posts)

  1. daveshine (David Decker)
    Member
    Posted 2 years ago #

    Unfortunately, this plugin is broken as of now: lot's of coding and syntax errors resulting in an unsable plugin. Would be great if you solve this issues soon.

    Just debug, test and debug before new release: please use WP_DEBUG "on"!

    Thanx, Dave :)

    http://wordpress.org/extend/plugins/gravity-forms-capsulecrm-add-on/

  2. hippoc
    Member
    Plugin Author

    Posted 2 years ago #

    Hello,

    Could you provide yours errors as i can understand your problem.

    On my wp and another in a production env, this works.

  3. hippoc
    Member
    Plugin Author

    Posted 2 years ago #

    I found one notice on the admin page and 2 notices, for non provided values, was it that?

    They were corrected and send to svn, if you have another problem, i will correct them.

  4. daveshine (David Decker)
    Member
    Posted 2 years ago #

    Hi there!
    My install has: PHP 5.2.17, MySQL 5, WP 3.3.1 - with WP_DEBUG mode "on"!

    The errors were obvious:

    I wanted to activate plugin and got:

    Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /my-path/wp-content/plugins/gravity-forms-capsulecrm-add-on/capsulecrm.php on line 12

    -> activation not possible, I fixed with:

    require_once( dirname( __FILE__ ) . '/api/CapsuleCRMAPI.php' );

    Next try with activation I got:

    Parse error: syntax error, unexpected T_STRING in /my-path/wp-content/plugins/gravity-forms-capsulecrm-add-on/api/CapsuleCRMAPI.php on line 287

    I fixed with this - the whole passage:

    if ( ( 0 !== $size ) && ( false !== $id) ) {
    	$this->commit("update", $entity, $data, $id);
    } else {
    	$this->commit("create", $entity, $data);
    }

    I know this might be wrong code but I only wanted to activate the plugin...

    After that activation did work.

    When trying to call your settings page for the plugin I got the next errors:

    Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /my-path/wp-content/plugins/gravity-forms-capsulecrm-add-on/api/CapsuleCRMAPIRules.php on line 180

    Also other errors with your directory codes, so I fixed in file /api/CapsuleCRMAPI.php the following:
    line 466 with:

    require_once ( dirname( __FILE__ ) . '$file.notcompressed' );

    Lines 473-475 with:

    require_once ( dirname( __FILE__ ) . '/CapsuleCRMAPITransformDynamics.php' );
    		require_once ( dirname( __FILE__ ) . '/CapsuleCRMAPIRules.php' );
    		require_once ( dirname( __FILE__ ) . '/GFToArray.php' );

    I hope this helps you fixing...

    Please activate WP_DEBUG on your test install.

    Thanx Dave :)

  5. hippoc
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    First i activated it (WP_DEBUG), and found the 3 notices, but no errors. And after your response i understand, all of them comes from the php version.

    Could you use php 5.3, this version (5.3) is three years old and is soon the old stable version, the stable is 5.4. There is lots of improvements in it, specially for security of the scripts.

    So i recommand you to search on yours hosting service if you have one, this is often possible to activate php version with a line in a .htaccess, or if it's your server, to change your php version. In fact all php versions are compatible, so this don't cause any problem.

    I'm sorry for there responses, but, i shouldn't rewrite all, specially because i don't have 5.2 server.

    Hippoc.

    PS: i don't understand your error on self::$inc (the :: is a Paamayim Nekudotayim) this technic exists from many years (before 5.3, i'm sure). So maybe could you try to change the line to

    $inc = self::$inc;
    $regex = array(
    	 "/_multiple/"=>"_" . $inc,

    As i don't have 5.2 server i can't verify that, but this could works.

    PPS: for the code on line 287 in CapsuleCRMAPI.php , this is better to use that :

    if ( ( 0 !== $size ) && ( false !== $id) ) {
    	$this->update($entity, $id, $data);
    } else {
    	$id = $this->create($entity, $data);
    }
  6. daveshine (David Decker)
    Member
    Posted 2 years ago #

    Thanx for your reply!
    Ok, with PHP 5.3 this makes some sense then... :)
    But I don't have any server yet with 5.3... As with a lot of other users!

    You should add some notice to your plugin description about the requirements and point this out clearly and then I've no problem with it.

    There are still A LOT of users out there who only can use their stuff on 5.2.x servers. Also WP itself requires 5.2.4 to date so most stuff is compatible with that. I guess if you add some message to your plugin this should do it.

    The reason for my testing was adding support for your plugin to my "Gravity Forms Toolbar" plugin, see: http://wordpress.org/extend/plugins/gravity-forms-toolbar/ (will be added in next version v1.4, releases soon :)

    --> Could you confirm please if I got the settings link right?

    admin.php?page=gf_capsulecrm

    Or is there more stuff in WP admin? Since I couldn't really activate/use/test the plugin maybe I did oversee something!

    Thanx for your support!
    -Dave :)

  7. hippoc
    Member
    Plugin Author

    Posted 2 years ago #

    Very cool plugin, usefull, as i always go on admin and next to gravity. This shortcut would be very cool.

    I installed it :)

    For the address this is good : admin.php?page=gf_capsulecrm.

    A last question, could you remove the broken comment, this not really beautifull on the first page.

    For the 5.2 compatibility, i went install a virtual box and make try even if i think the 5.3 version should be more an obligation to the hosting services make the migration.

    Thanks,

    Nicolas :)

  8. daveshine (David Decker)
    Member
    Posted 2 years ago #

    As I said I don't have any 5.3 hosting stuff yet and I don't want make a switch - not now and not in near future - with only one exception: if WordPress requirements should change soon then of course. But I don't see that coming soon...

    Just my suggestion: if you want a bigger user base - or in other words - the highest possible user base you should think about adding PHP 5.2.4+ compatibility.

    There are only a few plugins here in the repo that require PHP 5.3 - so its clearly a minority.

    Just my 2 cents.

    Thanx, Dave :)

  9. hippoc
    Member
    Plugin Author

    Posted 2 years ago #

    I understand you but i think this is unsecure to use a version which isn't supported (no more security patchs, no more tests).

    So i don't know if wordpress will change soon... But for me this really better to write __DIR__ than dirname(__FILE__), more logical, better written, as you want. A sentence of wordpress is "code is poetry". Why not use it?

    And the hostings services will move if wordpress move, or even if customers change to another provider.

    I'm surprizing, because, it seems than many provider have make the change OVH i'm sure they have 5.2, 5.3 and 5.4, 1&1 have php 5.2 and 5.4, (i speack about there, as you're deutch).

    So, if i can resume me, i want php 5.3 and better 5.4. for the moment i can wait all the advantages of 5.4 (do you know the traits? http://php.net/manual/fr/language.oop5.traits.php this is very near multiple inheritance).

    But just with 5.3, you can make many more than with 5.2, the spl is integrated, the date is an object, __DIR__, you can use static methods dynamically...

    To conclude, i say one again, this is unsecure to use a version which isn't supported anymore see http://php.net/downloads.php.

    Just my two cents too,

    Nicolas

  10. EasyWaste
    Member
    Posted 2 years ago #

    Hi,

    You mention that this requires the Premium version of Gravity forms, I take it that is the Developer version. Does this mean it won't work with Business or Personal versions?

    Also from the above since I know nothing of coding etc, this won't work unless we have PHP 5.3

    We can move to a 5.3 server but have no need of the Developer version.

    cheers
    Simon

  11. hippoc
    Member
    Plugin Author

    Posted 2 years ago #

    Hello,

    All gravity forms licences works with this plugin, this is more an advertising term, and a tribute to the works made on this excellent plugin.

    In conclusion, your last sentence is true, you can have anyone licence for gravityforms, but you should have php 5.3 minimum. PHP 5.4 is naturally supported too.

    Regards,

    Nicolas

  12. Carlos
    Member
    Posted 2 years ago #

    Thanks for creating this plugin. We were hoping for this! We installed the plugin and followed the instructions for setting it up. Everything on the setup side looks good - green checks, etc. However when we test a gravity form submission - and then go into our capsulecrm account to see if it transferred the capture - we do not see this new data.

    Any thoughts on what we are doing wrong or can do to get this implemented? Please advise and thanks!

    Carlos

  13. Carlos
    Member
    Posted 2 years ago #

    btw - we do have curl installed and enabled and are running PHP 5.3.6.

  14. hippoc
    Member
    Plugin Author

    Posted 2 years ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic