Open MarkCondello opened 9 months ago
@MarkCondello - I will check this out ASAP.
@MarkCondello , I would firstly upgrade to the latest version. We are running this on production.
If you like, you can call me +64221697577 during NZ business hours for help OR I can set up an example for you.
Basically, what I would do this is:
composer require sunnysideup/campaignmonitor:dev-master
and then adjust, as required.
Does that help?
Hey there, I deleted package.lock and ran the install:
Obv, that does not help.
Hi Mark,
From what I can tell you can add this to your composer file to make this go away:
"minimum-stability": "dev",
"prefer-stable": true,
CGPT SAYS:
To change the minimum stability to allow dev packages in Composer, update your composer.json file like this:
{ "minimum-stability": "dev" } This will set the minimum stability for all packages to dev. Remember, this can also allow unstable versions of other packages, not just the ones you specifically want in dev version.
Once we have got you up and running, we can then lock it to a version.
I have installed the latest through Composer and followed your docsfor a quick setup and the template issue remains.
Please see a screenshot of the issue from the CMS:
Its worth noting that the WYSIWYG is not loading for Newsletter sign-up pages and only shows after saving content. We are also only able to save changes and not able publish them.
Please advise on what we can do to have a working version of your module..
I have also created a CampaignMonitorSignupPage.ss
template assuming that is the required template for the Page type.
I have set up a demo site and I will fix up any issues you may have:
https://github.com/sunnysideup/silverstripe-campaignmonitor-demo
I will see if I can put up a working demo ASAP.
Hi @MarkCondello - please have a look at the demo. Make sure you add your api key, etc...
Sunnysideup\CampaignMonitorApi\Api\CampaignMonitorAPIConnectorBase:
client_id: 'aaa'
api_key: 'yyy'
If you find any further issues then please let me know and I will fix them.
I cloned the repo and added the standard setup for your extension which I did in my other project. There are issues reading the config settings. The API details are not getting read and I have tried both the .yml and .env options. Please see the screenshot for details:
I will check this out. Did you do a flush=all.
I performed a flush both in the browser and through sake
.
My mistake, I added the API key incorrectly to the .env
. I can render forms from the predefined list using the code base you provided.
There must be an issue with the other project settings.
I will see if I can set up a working demo for you and then you can compare all the required settings.
Hi Mark,
I got roped into other work. Do you still need to see a demo or do you need any other help?
Hi there,
I had another look into your package lately and unfort its still not performing properly.
I have new Newsletter sign-up page pulling in my mail lists from Campaign Monitor and I see the form on the front end. When submitting the form it produces a 500 error. Please see the screenshot for the details:
As you can see the form navigates to the thank you page, but of course no entry is added in Campaign Monitor due to the missing SignupForm endpoint.
I reviewed the docs and I feel like they need more work as it's not 100% clear the steps involved to use the package correctly. Also, this link in the readme leads to 404's: https://github.com/sunnysideup/silverstripe-campaignmonitor-api/blob/master/docs/en/userguide.md
Can you please advise how I can resolve the 500 error? Talk soon.
Can you show errors, so that you can show the error rather than just the 500 error?
Here you go.
Thank you. This is a deprecated function in the code of Campaign Monitor itself. So we need to upgrade CM's version. These errors should not show up in a production environment as they are warnings about future changes.
Here is the actual code: https://github.com/campaignmonitor/createsend-php/blob/master/class/serialisation.php#L38. They have not fixed this yet.
Their code is not very "best practice"; it is a bit hacky. If you know of a better core library then I would be interested in swapping out to it.
error-log.ERROR: Uncaught Exception Error: "Class "Sunnysideup\CampaignMonitor\Api\CS_REST_General" not found" at WEBSITE/vendor/sunnysideup/campaignmonitor/src/Api/CampaignMonitorAPIConnector.php line 1675 {"exception":"[object] (Error(code: 0): Class \"Sunnysideup\CampaignMonitor\Api\CS_REST_General\" not found at WEBSITE/vendor/sunnysideup/campaignmonitor/src/Api/CampaignMonitorAPIConnector.php:1675)"} []
error-log.WARNING: E_WARNING: Undefined property: stdClass::$Code {"code":2,"message":"Undefined property: stdClass::$Code","file":"WEBSITE/vendor/sunnysideup/campaignmonitor/src/Api/CampaignMonitorAPIConnector.php","line":1692} []
error-log.WARNING: E_DEPRECATED: strlen(): Passing null to parameter #1 ($string) of type string is deprecated {"code":8192,"message":"strlen(): Passing null to parameter #1 ($string) of type string is deprecated","file":"WEBSITE/vendor/sunnysideup/campaignmonitor/src/CampaignMonitorSignupPage.php","line":436} []
object(CS_REST_Wrapper_Result)#6162 (2) { ["response"]=> object(stdClass)#6154 (2) { ["error"]=> string(15) "invalid_request" ["error_description"]=> string(37) "Required parameters were not supplied" } ["http_status_code"]=> int(400) }
Errors relating to missing templates when trying to publish a Newsletter Sign Up page: [User Warning] None of the following templates could be found: Array ( [0] => Array ( [type] => Includes [0] => CampaignMonitorSignupPageContentInner ) [1] => CampaignMonitorSignupPageContentInner ) in themes "Array ( [0] => $public [1] => chu [2] => $default ) "