Can't create or edit newsletters

Hi, I've been trying to create newsletters using your plugin but it doesn't work and I have no clue why. Clicking on create newsletter gives this error:

wp-admin/customize.php?wp_customize=on&theme=Handwritten&newsletter_id=9&return=admin.php%3Fpage%3Dnewsletters

Page Could Not Be Loaded

We're very sorry, but the page could not be loaded properly. This should be fixed very soon, and we apologize for any inconvenience.
Debug Info:

Status: 500
Response: Service Unavailable
XID: 775388993

The newsletters do get created though because I can see them in the Newsletters page. However clicking edit on one of them gives the same error as above.

So what to do? :slight_smile:

Cheers
/Robert

  • Michael Bissett
    • Recruit

    Hey @Dukeswe, hope you're doing well today! :slight_smile:

    First off, I noticed that while you're using the latest version of WordPress, your version of BuddyPress could definitely use an update (I'm seeing that it's at 1.5.6, which was released in June of 2012).

    I'd want to update that, and I'd also want to see about updating any other plugins on your site.

    If that doesn't clear up anything, then I'd want to have a look at the server error log, and see if there's anything in there that can give us a clue as to what's going on here. If you're not sure about where to find it, I'd get in touch with your host.

    Once you're able to find it, could you post it on pastebin.com, and share the link to the post you made there? :slight_smile:

    Kind Regards,
    Michael

  • Dukeswe
    • Site Builder, Child of Zeus

    Hi, I had updated all the plugins to the latest not too long ago. Probably why the buddypress version still showed up as old for you. But yeah it doesn't work even with all things updated.

    Something to add is that the site has gotten slower and slower. Don't know if that has anything to do with this problem though. Any easy way to troubleshoot what is creating the long loading times? :slight_smile:

    Edit: Tested the site on http://tools.pingdom.com/fpt/#!/qVXHh/www.kostdemokrati.se There is definately something wrong. Sent a mail to the host to see if they can help me in that matter.

    Also I noticed in the related topics that some other people have had the same issue that I am having. I'm not really sure what their solutions were though.

    When it comes to the server logs I have sent them a mail for it.

    Thanks
    Robert

  • Dukeswe
    • Site Builder, Child of Zeus

    Hello again. I am actually still waiting for a response from my ISP. I've sent them two emails and yet no reply :disappointed: Apparently that is the only way for me to access the error logs. Will have to call them back soon and ask why there is no reply.

    I did look through the web console in firefox and I got this error if it helps:

    SyntaxError: illegal character admin.php:97
    <script type="text/javascript">
    $(?#signup-welcome).p(;:last-child').css('display', 'none');
    </script>
    <link target="_blank" href="http://www.kostdemokrati.se/wp-content/themes/bp-social/_inc/admin/options-css.css" rel="stylesheet" type="text/css" />

    I know that these kind of errors have made our feed stop working multiple times before.

    Decided to try your plugin on another site I have and got it to work there.

    Looking at your flowchart I haven't tried disabling all of the plugins or switching the theme. I don't want to potentially break the site in the process if it can be solved in any other way.
    If I do try and switch the theme will it be exacly as it was before I switched after I switch back? For example with widget positions and stuff like that. I do use a certain widget plugin aswell to create more widget locations.

    But lets see if those error logs can shine any light on the situation once I get my hold on them.

    Cheers
    /Robert

  • Ash
    • WordPress Hacker

    Hello @Dukeswe

    I hope you are well today.

    I did look through the web console in firefox and I got this error if it helps:

    Good point :slight_smile:

    If you mouse hover over the source of the js file in right side, you will see the full path and you will know the plugin (or theme) that is being conflicted, like the screenshot.

    Please let us know what you get.

    Cheers
    Ash

  • Dukeswe
    • Site Builder, Child of Zeus

    Hi again.
    Well I just get the same as I got before:
    <script type="text/javascript">
    $(?#signup-welcome).p(;:last-child').css('display', 'none');
    </script>
    <link target="_blank" href="http://www.kostdemokrati.se/wp-content/themes/bp-social/_inc/admin/options-css.css" rel="stylesheet" type="text/css" />

    Does this mean that the problem is somewhere located in your Social theme? I'm not really sure how to locate that specific Signup_welome part or how to fix it if I do find it.

  • Dukeswe
    • Site Builder, Child of Zeus

    Hi again,
    I got this same error when I just now updated your wpmu dashboard plugin to the latest version. It was in a box below on the "Your plugin has successfully been updated" page:

    Page Could Not Be Loaded

    We're very sorry, but the page could not be loaded properly. This should be fixed very soon, and we apologize for any inconvenience.
    Debug Info:

    Status: 500
    Response: Service Unavailable
    XID: 845705700

    Thought it might be worth mentioning.

    And I have given you access to look on our site and see if you can find the problem. Just know the wordpress used is on Swedish :slight_smile:
    Also I don't want you changing theme or disabling all plugins or such that could potentially break stuff on the site without asking first if it is ok. So just have a look :slight_smile:

    Cheers
    /Robert

  • Ash
    • WordPress Hacker

    Yes, I can see the issue. The js error comes from any external code that is used in your theme or injected by any external script/plugins.

    About the error, it seems an issue related to your server. But I am tagging an available developer from second level support line in this thread for his valuable opinion on this issue. We appreciate your patience on this.

    Cheers
    Ash

  • Hoang Ngo
    • Code Slayer

    Hi @Dukeswe,

    I hope you are well today and I'm sorry for the delay.

    Due to the 500 issue, I will need to have access to your cpanel to check the error log, or we don't have any idea what's causing it :slight_frown:. so can you please send in:

    - Mark to my attention - ATTN: Hoang Ngo
    - Link back to this thread
    - Include admin/network access
    - Include cPanel (I will need to look at the DB so need PHPMyAdmin or similar)
    - Include any relevant URLS for your site

    On the contact form, select "I have a different question", this ensures it comes through and gets assigned to me.

    I'm sorry for this inconvenience and many thanks for your patience.

    Best regards,
    Hoang Ngo

  • Dukeswe
    • Site Builder, Child of Zeus

    Hello again. Unfortunately there is no way for me to get the error log without emailing the support. Last time I managed to get the error log for the wrong day.

    So I will again email them for the correct error log once we've fixed our sites that are currently affected by a virus.

    For the admin access should I just enable support access using your plugin?

    I could give the DB PHPMyAdmin details if you end up needing it but first a look on the error logs once I've gotten them.

    Cheers
    Robert

  • Hoang Ngo
    • Code Slayer

    Hi @Dukeswe,

    I hope you are well today.

    For the admin access should I just enable support access using your plugin?

    I think better you can send us the ftp access, as it not expired.

    I could give the DB PHPMyAdmin details if you end up needing it but first a look on the error logs once I've gotten them.

    Thanks you, if possible, please send it with the logs when you can get it :slight_smile:.

    Best regards,
    Hoang Ngo

  • Dukeswe
    • Site Builder, Child of Zeus

    Ok here is the error log.
    Looking through it myself I found some lines on 4, 5, 2135, 2136, 2140, 2142, 2143 and 2144 that could be of interest.

    I also sent you a message with DB information through your contact form.

  • Hoang Ngo
    • Code Slayer

    Hi @Dukeswe,

    I hope you are well today and many thanks for your information.

    This is the main reason why the error 500 come up
    Premature end of script headers: customize.php, referer: http://www.domain/wp-admin/network/admin.php?page=newsletters
    This mostly cause by the page need more time to process, and sometime, that take longer than the limit, and this error come up.

    For fix it, we need to increase the limit time, usually, if this is your server, we just need to add this code to apache config

    <IfModule mod_fcgid.c>
      # 5 minutes for IO timeout, default is 40 seconds
      FcgidIOTimeout 300
    </IfModule>

    This mostly because the server config, I'm sorry for this inconvenience, but can you please check with your host provider about the timeout limit?

    Best regards,
    Hoang Ngo

  • Dukeswe
    • Site Builder, Child of Zeus

    Hi again.
    The support I just mailed says that the: max_execution_time is set at 120 seconds and that they can't change it.

    So I'm not really sure how to proceed. Maybe find the underlying reason for why the script takes so long to run in the first place?

  • Ash
    • WordPress Hacker

    Hello @Dukeswe

    Is this a shared hosting? As our developer @Hoang Ngo said that sometimes it needs more time to be executed, so it's quite difficult to track it down.

    I am tagging @Hoang Ngo again if he has any more opinion on this issue.

    Cheers
    Ash

  • Dukeswe
    • Site Builder, Child of Zeus

    Yes it is shared hosting. Probably why they have rules on not changing some restrictions.

    Still 2 minutes seems like plenty of time for it to just start the edit process right? I did try it on another of our sites running on the same server and then it worked. Barely any members on it nor a multisite though.

  • Hoang Ngo
    • Code Slayer

    Hi @Dukeswe,

    I hope you are well today.

    The support I just mailed says that the: max_execution_time is set at 120 seconds and that they can't change it.
    Actually the max_execution_time and FcgidIOTimeout is totally different.
    max_execution_time This sets the maximum CPU time in seconds a script is allowed to run
    FcgidIOTimeout This is specific to mod_fcgid and does NOT override any other settings. The default is 40 seconds. This is the time that mod fastcgi waitting for PHP to response.

    So, sometime if the FcgidIOTimeout is set for too low, if some task need more time to process and over the limit, the mod fastcgi will kill the thread, and cause the 500 error.

    I'm not sure how about the Hosting Provider setup the config, but it will have separate for each site, so include a config for your site is not really hard, as it not global setting.

    Best regards,
    Hoang Ngo

  • Dukeswe
    • Site Builder, Child of Zeus

    I finally got a response back from them pretty much saying some settings are global and some can be site based and when it comes to FcgidIOTimeout they don't know and that I should try putting it into my .htaccess file.

    I tried putting the code you gave earlier there and it broke the site so I'm guessing that doesn't work.

    Any other way you could put the required code it into the .htaccess?

    Cheers

  • Hoang Ngo
    • Code Slayer

    Hi @Dukeswe,

    I hope you are well today and thanks for your information.

    Can you please send me the ftp access, please send in:

    - Mark to my attention - ATTN: Hoang Ngo
    - Link back to this thread
    - Include admin/network access
    - Include FTP
    - Include any relevant URLS for your site

    On the contact form, select "I have a different question", this ensures it comes through and gets assigned to me.

    Thanks!!.

    Best regards,
    Hoang Ngo

  • Hoang Ngo
    • Code Slayer

    Hi @Dukeswe,

    I hope you are well today.

    I try various config, unfortunately, there's no way to extends the config from htaccess :slight_frown:

    Also, one note that when we try to load the page customize.php?wp_customize=on&theme=Handwritten&newsletter_id=10&return=admin.php%3Fpage%3Dnewsletters, that's load very very long, this is something not common.

    I will flag the lead developer @Maniu here for his valuable inputs.

    I'm sorry for this inconvenience and many thanks for your patience.

    Best regards,
    Hoang Ngo

  • Dukeswe
    • Site Builder, Child of Zeus

    It has been some time since I last wrote here since you unfortunately were never able to help me with this problem.
    It took me a year but I finally figured it out! Apparently there wasn't enough allocated memory. By putting this in my wp-config.php it now seems to work.
    define('WP_MEMORY_LIMIT', '512M');

    Thought I should let you know :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.