WordPress.org

Ready to get started?Download WordPress

Forums

Multiple content blocks
[resolved] Problems with multi content blocks after Update (28 posts)

  1. Paramedic
    Member
    Posted 1 year ago #

    Hi,

    i have updatet wordpress to 3.5 and multi content blocks to 3.0.1 at the same time. I have many content blocks in twelve templates. Now i have a problem. If i try to create a new conten page with a template i get this message: "Your server doesn't allow remote HTTP requests using wp_remote_get. You will have to visit this page manually to update which blocks are used on each page."
    If i try to edit exiting pages with multi content blocks the editor windows of every content blog is change into specified fields with names like "mcb-xxx". I can see the editor windows of every content block after reload but i cant edit the content.

    Any idea??

    http://wordpress.org/extend/plugins/multiple-content-blocks/

  2. Trendwerk
    Member
    Plugin Author

    Posted 1 year ago #

    So if I understand correctly you do see the content blocks, but you can't edit the content. Why can't you edit it? Does it not save correctly, or are you just not able to type in the content area?

  3. Paramedic
    Member
    Posted 1 year ago #

    Hi,

    thanks 4 ur fast answer. My english is not the best - sorry.
    1. I can type into the content area but it doesnt save it.
    2. when i try to update the page content in the dashboard the editing windows are not available after saving.
    3. I see the exiting content blocks in the frontend.

  4. Trendwerk
    Member
    Plugin Author

    Posted 1 year ago #

    That's quite strange. I cannot seem to re-create this error myself. Does it work correcly when you comment (// in front of the line) line 69 from assets/inc/functions.template-tags.php?

  5. Paramedic
    Member
    Posted 1 year ago #

    Yeaa - It seems that it works. Many many thanks!

    If i get more or other probs i´ll post it.

  6. Trendwerk
    Member
    Plugin Author

    Posted 1 year ago #

    Ok, thanks. We still don't really know what the real problem behind this is, so we can't fix it right now. Hopefully we'll be able to re-create the bug.

  7. Paramedic
    Member
    Posted 1 year ago #

    Im sure u will find it! Its a great plugin!

  8. nielstoft
    Member
    Posted 1 year ago #

    Hi,
    I have the same problem. I've used the plugin successfully in the past, but the admin panel is not updating (not showing the extra wysiwyg modules).

    Commenting out (and even deleting) line 69 in above mentioned file did not do the trick, unfortunately. Any other suggestions?

    BTW, I'm using a theme called "Peacemaker" bought on Themeforest, if that has known to be cause of these issues.

  9. Trendwerk
    Member
    Plugin Author

    Posted 1 year ago #

    I don't know about that theme and if it could cause any problems. Do you see the blocks at all? Or do you see them and they're gone after updating?

    Could you try commenting out line 89 and 90 of assets/inc/class.MCB.php? Then you should first visit the page in the front-end and try again in the back-end.

    Let me know if that helps.

  10. nielstoft
    Member
    Posted 1 year ago #

    Thank you for your reply.

    Late last night, I deactivated my theme, reactivated it. I also deleted the MCB plugin and re-installed it, commented out line 69, and wrapped the "get_block" line in style="display:none" and it started working after one time displaying the HTTP request error. Now it works. However - Now i have to figure out why it displays on ALL templates.

    I will try to comment out line 89 & 90 like you suggested to see if that irons out any inconsistencies.

    That being said, i really like the functionality of the plugin. Why it's not part of core WP as an option, is beyond me. All the sites I've done on behalf of clients employ it. So, thank you!

  11. Trendwerk
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for your help and compliments. We'll continue to work on it, the plugin has recently been rewritten completely because it was doomed to break some day.

    Now it's prepared for the future and we'll keep working on it. Hope we'll fix this issue soon!

  12. lightcresent
    Member
    Posted 1 year ago #

    It still gives me same trouble, after each save in backend, multiple block becomes blank and doesn't show.

    After i save it again, it comes back but MBC block remains blank.

    Plz suggest solution.

  13. Trendwerk
    Member
    Plugin Author

    Posted 1 year ago #

    Did you try commenting out lines 89 & 90 of 'assets/inc/class.MCB.php' the plugin?

  14. lightcresent
    Member
    Posted 1 year ago #

    When i do that, it throws plugin error......

  15. Trendwerk
    Member
    Plugin Author

    Posted 1 year ago #

    Woops, the line numbers changed in the last update. In case you have the latest version (3.0.3), the lines to comment are 101 and 102.

    We're working on this, but I still haven't found a way to re-create this bug. So it's quite hard to see what's causing it. So in future updates, it might not be fixed and you may have to re-comment these lines.

    Try comments these lines and visit the page in the front-end. You will probably see the editor now. Let me know please!

  16. lightcresent
    Member
    Posted 1 year ago #

    Yeah it did fix.... Will it be permanent solution? I kept loosing content every nw and then before this fix...

  17. Trendwerk
    Member
    Plugin Author

    Posted 1 year ago #

    You shouldn't have lost content. That's weird. The content should've remained in the database to be used when the blocks DID work.

    I guess you shouldn't update to the version I've just released, since this included different changes. Or you should comment lines 101 and 102 again.

    I'll look into it when I have some time :)

  18. lightcresent
    Member
    Posted 1 year ago #

    Thanks.. appreciate ur help...

  19. winnard
    Member
    Posted 1 year ago #

    I was having similar issues where I had four separate content blocks on a custom page template. When I set the content blocks up they were correct. But I needed to change an image and it would not save, update or once updated show three out of the four content blocks.

    Having read this post, I commented out the function in the functions.template-tags page that refreshes the blocks. I believe it is something to do with this function which is affecting it. I commented out the following code and it now functions as expected.

    /**
     * Reset which blocks are used when visiting the page
     */
    //function mcb_refresh_blocks() {
    //	global $post;
    //	if(isset($post)) delete_post_meta($post->ID,'mcb-blocks');
    //}
    //add_action('wp_head','mcb_refresh_blocks');
  20. Trendwerk
    Member
    Plugin Author

    Posted 1 year ago #

    Hmm ok, that might be useful. I'm very busy at the moment, but when I have time I'll definitely look into this. Hope I can recreate it by that time.

  21. winnard
    Member
    Posted 1 year ago #

    It doesn't bring up any errors when error reporting is set to true in wp-config. Sorry I don't know enough about PHP to offer a solution or help resolve it.

    The way I have this setup so maybe you can recreate it to test is as follows.

    I have a custom page template called front-page in this page is four columned areas for your multiple content blocks called:

    right-main
    left
    center
    right

    I added in the get_block('name of block'); call into the theme template.

    Now in the page editing area when it is first loaded up all four content blocks show up under the text area in order right-main, left, center and right.

    I go to edit for this example 'center' block, make some tweaks and hit UPDATE. What happens is once the page reloads and updates it then only shows the first content block in the list, in this case right-main. The others disappear.

    If I then go out to the pages list and click back into the front-page all the blocks return but the edits made have reverted back to before the update.

    Once I commented out this line all was working well and true.

    I hope this helps.

    Dan

  22. Trendwerk
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for you elaborate explanation. I'll look into it (hopefully soon!)

  23. ckhardy@gmail.com
    Member
    Posted 11 months ago #

    I also had a problem with content disappearing. I've commented out the refresh lines in functions.template-tags.php, which hopefully will fix it. Where in the database is the content stored? The content was completely wiped out ... not present anywhere in the database.

    I was able to rebuild the content from a browser cached version but that was just a lucky find.

  24. Trendwerk
    Member
    Plugin Author

    Posted 11 months ago #

    Hmm, I wouldn't want anybody to lose content. It's stored in the postmeta for each block.

    I wasn't able to reproduce this bug and unfortunately I don't really have a lot of time right now for plugin maintenance. But I will look into it, hopefully some time soon.

  25. Rene
    Member
    Posted 11 months ago #

    Hi there,

    I've just started using the plugin and also ended up with the error message "Your server doesn't allow remote HTTP requests using wp_remote_get. You will have to visit this page manually to update which blocks are used on each page." Neither visiting the page (after saving) nor disabling all security plugins solved this problem. (We're using GoDaddy Linux web hosting for this website.)

    I finally commented out what is now line 99 in assets/inc/functions.template-tags.php:
    i.e. if(isset($post)) delete_post_meta($post->ID,'mcb-blocks');. This brought up the the field both in the backend and on the page but the error message is still there.

    Is this still the best way forward?

  26. Trendwerk
    Member
    Plugin Author

    Posted 11 months ago #

    Hmm that's strange. It's too bad that I cannot yet reproduce this error, since I'm just guessing what's going on.

    Can you try commenting line 101 and 102 in assets/inc/class.MCB.php?

  27. Rene
    Member
    Posted 11 months ago #

    Yes, thanks, that removes the error message. But the front-end page still needs to be opened to add the block on the back-end. (And it's not removed on the back-end after switching to a template without multi-content-blocks.)

  28. Trendwerk
    Member
    Plugin Author

    Posted 11 months ago #

    That's right. The actual problem is not solved, the blocks just don't try to refresh themselves in the back-end.

    This means you will have to visit the front-end to refresh the content blocks. If you want to solve this problems, you will have allow remote HTTP requests to your server (from your server). The plugin uses wp_remote_get to visit the page (http://codex.wordpress.org/Function_Reference/wp_remote_get).

    I cannot know what the exact problem is in your current setup. Do the normal WordPress cronjobs work?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic