Skip to toolbar

Find answers, ask questions, and connect with our
community around the world.

Forums Forums Bug Reports Error 500, Error log blocks/content-toggle/block.php

  • Error 500, Error log blocks/content-toggle/block.php

     Carla Maria updated 2 weeks, 4 days ago 2 Members · 8 Posts
  • Carla Maria

    October 1, 2020 at 9:19 pm

    Hello! Several times a day my error log records this: “AH01215: PHP Warning: array_unique() expects parameter 1 to be array, null given in /mnt/web501/a3/85/510647385/htdocs/WordPress_SecureMode_01/wp-content/plugins/ultimate-blocks/src/blocks/content-toggle/block.php on line 107: /home/strato/http/power/rid/73/85/510647385/htdocs/WordPress_SecureMode_01/index.php”

    I am even getting a Error 500 when it happens. I was able to verify this several times today. Deactivated other plugIns but it did not help. Do you see any possible solution?

    Thank you very much for your help!

  • Alexis

    October 2, 2020 at 12:50 pm

    Hi @MoinMollie ! The error comes from the part where the JSON-LD code for the content toggle block is being generated. The contents of each panel within the block are supposed to be parsed before they’re added to the JSON code. However, they’re not being processed properly in this case, which leads to one of the parameters being null instead of the array that it expects.

    If you’re willing to help on debugging the issue, you can download a replacement file for ultimate-blocks/src/blocks/content-toggle/block.php that would prevent the error you’re experiencing and at the same time output the data that’s not being processed correctly. Afterwards, please share here what’s being outputted so that a fix for this bug could be made.

  • Carla Maria

    October 2, 2020 at 1:19 pm

    Hi Alexis! I am totally willing to help, but I have no idea what to do with the replacement file, where to put it in my account etc. And I am concerned manually doing something I don’t know a lot about as I am a writer, not a developer, and causing more trouble than I already have.

    If you would be able to solve the problem and it would get fixed within an plugin update, I would be more than happy as of now I would rather keep ultimate blocks than be willing to change quite a few of my excisting blogposts and go back to the start.

    If you see any possibility to guide me through it easily and safe please let me know. Otherwise I would then prefer hoping for a soon to be update. I am sorry.

    • Alexis

      October 3, 2020 at 9:28 am

      Hi @MoinMollie ! There are two ways to directly access the plugin files: (1) through the plugin editor, which is the easier way, and (2) via FTP. Before doing any of them to edit the plugin files, please deactivate the plugin first and ensure that you have the replacement file ready.

      For the first one, you can go to WordPress’ built-in plugin editor by clicking on Plugins > Plugin Editor at the sidebar. You may see a popup warning about directly editing the plugin files if it’s your first time going there, but it should go away after clicking on “I understand”,. Then, you should be able to see a dropdown list containing the list of plugins you currently have. Pick “Ultimate Blocks” from the dropdown list and then click on “Select”. Afterwards, using the Plugin Files scroll list right below the plugin dropdown list, go to src > blocks > content-toggle > block.php. After clicking on it, you should be able to see the content toggle block’s PHP source code. Copy the original source code to a separate file, then paste on the original the contents of the replacement file. Finally, save it by clicking on update file.

      In case the first method doesn’t work, you’ll need to use an FTP client to use the second method. This guide shows how to access the WordPress theme folder in your current host through an FTP client, but, in our case, we have to go to the WordPress plugin folder instead. After reaching the plugin folder, go to ultimate-blocks/src/blocks/content-toggle. Then, rename the original block.php file before pasting the replacement file.

      After you’re able to save the replacement file in either method, you can reactivate the plugin. In pages where you didn’t turn on “Enable FAQ Schema” for the content toggle block, nothing should change at all. In pages where you turned it on, some changes in output are expected when the bug that causes your current issue comes up again (and, as soon as you take note of the changes that happen, you can hide them by turning the FAQ schema off). Either way, please let us know what would come up this time.

  • Carla Maria

    October 3, 2020 at 3:10 pm

    Hi @Alexis , thank you very much for the clear instructions. I was able to follow it and in the end put it back to “normal”. Also I found the one position where FAQ scheme was enabled.

    Following I collected all the information I saw in frontend (without the long answer texts in between), also in backend whilst trying edit it and then the errorlog. I will have an eye on the errorlog whether somethin else comes up now that I deactivated the FAQ scheme – but I think there should be nothing at this point then, right?

    Hope this helps you as much as you helped me. Thank you again 🙂


    Syntax errorstring(5649) “{“@type”:”Question”,”name”:”Worüber will ich schreiben und warum?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”

    “}}, {“@type”:”Question”,”name”:”Welche Kategorien und Tags will ich vergeben?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”

    “}}, {“@type”:”Question”,”name”:”Was steht auf meiner “Über den Blog”-Seite?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”

    “}}, {“@type”:”Question”,”name”:”Wie viel möchte ich von mir selbst freigeben?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”

    “}}, {“@type”:”Question”,”name”:”Wie sollen meine Beiträge aufgebaut sein?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”

    “}}, {“@type”:”Question”,”name”:”Passend dazu: ist mein Content Bild- oder Textlastig?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”

    “}}, {“@type”:”Question”,”name”:”Wie will ich meine Leser ansprechen?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”

    “}}, {“@type”:”Question”,”name”:”Welche Sprache/n soll/en es sein?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”

    “}}, {“@type”:”Question”,”name”:”Möchte ich bei einem Anbieter bloggen oder hosten?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”

    “}}, {“@type”:”Question”,”name”:”Wie viele Daten will ich mit dem Blog sammeln?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”

    “}}, {“@type”:”Question”,”name”:”Will ich meinen Blog monetarisieren?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”



    TypeError: Cannot read property ‘EditorState’ of undefined

    at t.unserializeEditor (

    at new O (

    at Ag (

    at Vg (

    at ph (

    at lh (

    at O (

    at ze (


    at unstable_runWithPriority (


    03.10.2020 16:48:54 [client 2a02:560:4200::] PHP Warning: Cannot modify header information – headers already sent by (output started at /mnt/web501/a3/85/510647385/htdocs/WordPress_SecureMode_01/wp-content/plugins/ultimate-blocks/src/blocks/content-toggle/block.php:136) in /mnt/web501/a3/85/510647385/htdocs/WordPress_SecureMode_01/wp-admin/admin-header.php on line 9

    03.10.2020 16:52:02 [client 2a02:560:4200::] PHP Warning: Cannot modify header information – headers already sent by (output started at /mnt/web501/a3/85/510647385/htdocs/WordPress_SecureMode_01/wp-content/plugins/ultimate-blocks/src/blocks/content-toggle/block.php:136) in /mnt/web501/a3/85/510647385/htdocs/WordPress_SecureMode_01/wp-admin/admin-header.php on line 9

    03.10.2020 16:55:52 [client 2a02:560:4200::] PHP Warning: unlink(/mnt/web501/a3/85/510647385/htdocs/WordPress_SecureMode_01/wp-content/uploads/ultimate-blocks/ No such file or directory in /mnt/web501/a3/85/510647385/htdocs/WordPress_SecureMode_01/wp-content/plugins/ultimate-blocks/includes/class-ultimate-blocks-deactivator.php on line 35

    03.10.2020 16:55:52 [client 2a02:560:4200::] PHP Warning: unlink(/mnt/web501/a3/85/510647385/htdocs/WordPress_SecureMode_01/wp-content/uploads/ultimate-blocks/ No such file or directory in /mnt/web501/a3/85/510647385/htdocs/WordPress_SecureMode_01/wp-content/plugins/ultimate-blocks/includes/class-ultimate-blocks-deactivator.php on line 36

    03.10.2020 16:55:52 [client 2a02:560:4200::] PHP Warning: unlink(/mnt/web501/a3/85/510647385/htdocs/WordPress_SecureMode_01/wp-content/uploads/ultimate-blocks/sprite-twitter.png): No such file or directory in /mnt/web501/a3/85/510647385/htdocs/WordPress_SecureMode_01/wp-content/plugins/ultimate-blocks/includes/class-ultimate-blocks-deactivator.php on line 37

    03.10.2020 16:55:52 [client 2a02:560:4200::] PHP Warning: rmdir(/mnt/web501/a3/85/510647385/htdocs/WordPress_SecureMode_01/wp-content/uploads/ultimate-blocks): No such file or directory in /mnt/web501/a3/85/510647385/htdocs/WordPress_SecureMode_01/wp-content/plugins/ultimate-blocks/includes/class-ultimate-blocks-deactivator.php on line 38

    03.10.2020 16:58:39 [client 2a02:560:4200::] PHP Warning: array_values() expects parameter 1 to be array, null given in /mnt/web501/a3/85/510647385/htdocs/WordPress_SecureMode_01/wp-content/plugins/ultimate-blocks/src/blocks/content-toggle/block.php on line 107

  • Alexis

    October 4, 2020 at 1:29 pm

    Thanks @MoinMollie . That’s bring us a step closer to the fix.

    The outputted strings look normal to me at a first glance. However, any of the following might have caused this error.

    1. Smart quotation marks erroneously replaced straight quotation marks

    To make the function for generating the FAQ schema code work properly, all quotation marks within the string other than the ones you’ve entered yourself should be straight instead of curly. In JSON, quotation marks are used to mark where a string begins and ends.

    This is a straight quotation mark: "
    And these are examples of curly quotation marks: „ “ ”

    If, in the outputted string, the quotation marks around “@type”, “Question”, “acceptedAnswer”, and others are curly ones, we have a problem there.

    2. HTML entities replace quotes

    HTML entities are used for displaying characters that, for whatever reason, may not be rendered directly. Your page, for example, currently uses the codes „ and “ for quotation marks. However, such ways of representing quotation marks for marking the beginning and the end of string values within JSON strings don’t work. The parsing function would also fail if, instead of actual quotation marks, we get codes similar to those ones (whether containing a codename or a number that corresponds to its Unicode value) appear.

    I’ve yet to encounter this issue on my end, but I may be able to make a fix that would fit for your situation. If you view the source code by right-clicking on the page and clicking on “View Source”, you’ll be able to see the underlying characters behind the page.

    //This is what a normal JSON string looks like

    '{"@type":"Question","name":"Worüber will ich schreiben und warum?","acceptedAnswer":{"@type":"Answer","text":""}}'

    Please turn on the FAQ schema again and, this time, check the source code that corresponds to the generated schema code for content toggle block. If it doesn’t look like anything that resembles a normal JSON string, please either (1) take a screenshot and post a link to it, or (2) copy it here but enter it as preformatted text (to ensure that the straight and curly quotes are preserved properly in the post).

  • Alexis

    October 4, 2020 at 1:48 pm

    Since I could no longer edit my reply above, here are the HTML entities for quotation marks that you have to watch out for:

     & #8222; & #8221; & #8220; „ “ ” & #x201E; & #x201C; & #x201D;
    • Carla Maria

      October 4, 2020 at 6:56 pm

      Hi, I was not able to readjust in the last couple of minutes what you wrote. Tried it with the original article as well as a test article. However – there are still error 500 logged with this errorlog notice: „FastCGI: “/home/strato/http/fastcgi/rid/73/85/510647385/htdocs/WordPress_SecureMode_01/index.php” aborted: incomplete headers (0 bytes) received from server after 0 sec“ My hoster says this is also combined with the plugin ultimate blocks. I have no idea but as of now thinking about changing the contents and plugin. Sorry for that. Thanks for your help though.

Log in to reply.

Original Post
0 of 0 posts June 2018