Jump to:

10994 Posts in 2728 Topics by 1819 members

All other Modules

SilverStripe Forums » All other Modules » Can't load saved newsletter (error loading page)

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2 3 4
Go to End
Author Topic: 3785 Views
  • davepolyester
    Avatar
    Community Member
    47 Posts

    Re: Can't load saved newsletter (error loading page) Link to this post

    I'm having all sorts of nightmares upgrading to 2.4!

    Having followed the instructions very carefully, I flushed the database and just got a generic error message. I added the line Director::set_environment_type("dev"); to my _config.php file to get some more info on the error, but somehow this caused the database to rebuild properly.

    I then went to refresh the CMS and got this error message:

    [Warning] Missing argument 2 for CheckboxSetWithExtraField::setValue(), called in .../sapphire/forms/FormField.php on line 78 and defined
    GET /silverstripe-v2.3.7/admin/?flush=1

    Line 237 in .../newsletter/code/CheckboxSetWithExtraField.php
    Source

    228                   $record->$k = Convert::array2json($v);
    229                }
    230             }
    231          } else {
    232             $record->$fieldname = '';
    233          }
    234       }
    235    }
    236    
    237    function setValue($val, $data){
    238       if(is_string($val)) {
    239          $val = explode(",", $val);
    240       }
    241    
    242       $this->value = $val;
    243       

    This looks to me like an issue between the new Silverstripe version and the Newsletter module.

    If I remove the Newsletter module from my webroot and flush the database I just get a blank white screen.

    Any thoughts or solutions?

    Thanks kindly for your help.

  • yurigoul
    Avatar
    Community Member
    202 Posts

    Re: Can't load saved newsletter (error loading page) Link to this post

    Do you have userforms installed? You do not need userforms anymore for the new newsletter module and userforms is still at 2.3.x

    Do you still have an old subscribe form installed? try removing it temporarily (by dragging it out of the mysite/code folder or removing the php extension)

    Flushing the database = yoursite.com/dev/build ???? (both when removing and installing the newsletter)

    I tried on a local install and did not get any errors, could save and edit a draft newsletter. I will try the unsubscribe feature later

  • davepolyester
    Avatar
    Community Member
    47 Posts

    Re: Can't load saved newsletter (error loading page) Link to this post

    I've tried removing the Userforms module but this hasn't made a difference it would seem. The same error message remains.

    When I initially set up Newsletter module in my 2.3.7 version of Silverstripe I discovered quickly on the forums that Userforms was no longer needed so just set up my subscription page with the SubscriptionPage type that comes with Newsletter. This was working fine.

    I had tried to do a subscription page with the old Userforms method but this hadn't worked so I'd deleted that page. I can't see any old subscribe forms in my mysite/code folder.

    Perhaps I need to start over with a fresh install of Silverstripe 2.4, then copy my Themes and Mysite folders into it? Kinda the opposite workflow to the usual upgrade process.

    Do I need to make sure my server is turned off when I drag things in and out of my webroot or is it OK to leave it running during the upgrade process?

  • yurigoul
    Avatar
    Community Member
    202 Posts

    Re: Can't load saved newsletter (error loading page) Link to this post

    you can safely keep your webserver on, np.

  • davepolyester
    Avatar
    Community Member
    47 Posts

    Re: Can't load saved newsletter (error loading page) Link to this post

    I'm going to try reverting back to my original 2.3.7 install that was working fine (apart from Newsletter issues that prompted my original post).

    Then I'll remove Userforms and Newsletter modules, and make sure site is working without them before doing the 2.4 upgrade. If I can get the upgrade working I'll reinstall Newsletter and go from there.

    Will let you know how I get on.

  • TF-35Lightning
    Avatar
    Community Member
    137 Posts

    Re: Can't load saved newsletter (error loading page) Link to this post

    I am getting the same error here. I'm on stable 2.4 and are trying to use the newsletter module for the first time. (I've using the daily build version for the newsletter module)

    I create a draft email and click save, but then I go to click back and look at the saved draft and I get "error loading page".

    Any help would be great

  • yurigoul
    Avatar
    Community Member
    202 Posts

    Re: Can't load saved newsletter (error loading page) Link to this post

    check: http://doc.silverstripe.org/upgrading:2.4.0#renamed_classes

    There are some classes that have to be renamed, three in total if I am not mistaken:

    SSDateTime should be SS_Datetime
    Database should be SS_Database

    And then there is one other that specifically causes a problem with the opening and saving of a newsletter draft. I believe it was either HTTPRequest (should be SS_HTTPRequest) or HTTPResponse (should be SS_HTTPResponse), but it could also be another.

    It can also be that the first two classes have already been renamed.

  • TF-35Lightning
    Avatar
    Community Member
    137 Posts

    Re: Can't load saved newsletter (error loading page) Link to this post

    yurigoul, thankyou for the response, you have probably saved me from tearing my hair out for the next 8 hours!

    2 name changes must be made.

    Database   to SS_Database

    and

    HTTPRequest to SS_HTTPRequest

    I've got a ticket open, which I will now fix up with this solution.

    Thanks again!

    3785 Views
Page: 1 2 3 4
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.