WordPress.org

Ready to get started?Download WordPress

Forums

Multiple content blocks
[resolved] Front end doesn't work (11 posts)

  1. anaketa
    Member
    Posted 7 months ago #

    Hi,
    I just update the plugin from 2.0 to 3.1 because it didn't work anymore.
    After the update the most of the problems are fixed but I can't still see anythings in the front end, actually just in one page. The others works fine.
    The back end works good, i can edit and save.
    I try to read some forum and I commented out some lines of code but no changes at all.

    I also have an error in my frontend after the footer, but just if I logged in.
    The error is:
    (function() { var request, b = document.body, c = 'className', cs = 'customize-support', rcs = new RegExp('(^|\\s+)(no-)?'+cs+'(\\s+|$)'); request = true; b[c] = b[c].replace( rcs, ' ' ); b[c] += ( window.postMessage && request ? ' ' : ' no-' ) + cs; }());

    But of' course the footer.php is clean.

    Any thoughts?
    Thanks

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

  2. Trendwerk
    Member
    Plugin Author

    Posted 7 months ago #

    That error does not come from MCB, we don't use JavaScript at all. So you have some other error in your code (or another plugin).

    Can you be a little more specific? You can edit and save the blocks, and when you've saved them you still see this content in the editor? But it doesn't show up in the front-end? Because that seems impossible to me..

  3. anaketa
    Member
    Posted 7 months ago #

    Thank for the quick answer!

    yes i can still see the content in the editor but I don't see any changes in the front end.
    that's the page:
    http://www.rebatenetworks.com/portfolio

    Basically where you see the map, and doing the hover over the icon, there is the manager content block.
    Can be a problem of another plugin, but i tried to disinstall all of them and install just this one and I see the error.
    (if i take off this content block I can't see the footer anymore so I can't see if the error is still there or not)

  4. Trendwerk
    Member
    Plugin Author

    Posted 7 months ago #

    It's hard to see what's going on, but it seems like the $post variable isn't right. Because the post meta seems to be saved in the database.

    Can you try wp_reset_postdata(); right before calling the block?

  5. anaketa
    Member
    Posted 7 months ago #

    I tried at least in one block and it doesn't change anything
    Is it maybe a database problem?
    The database needs to be clean up?

  6. Trendwerk
    Member
    Plugin Author

    Posted 7 months ago #

    If you're using some kind of database cache, this might be interfering.

    What do you get when you print_r( $GLOBALS['post'] ); right before calling the_block? Is this the post you want to show a block for?

  7. anaketa
    Member
    Posted 7 months ago #

    unfortunately i don't know which database I use, since is a client work and I don't even have the access to the database.

    So this is one of my block in that page:
    <li class="info-block Canada"><?php the_block('Canada'); ?>close

    and I just did it this:
    <li class="info-block Canada"><?php print_r( $GLOBALS['post'] ); the_block('Canada'); ?>close

    And nothing happen. Should I check in the frontend right?

  8. Trendwerk
    Member
    Plugin Author

    Posted 7 months ago #

    Something is happening, check the source code. Your blocks seems to work as well, they are not showing because of the styling (try display:block on li.info-block.

    Your code is probably not working because of your JavaScript error. So this has nothing to do with our plugin. Marking this as resolved.

  9. anaketa
    Member
    Posted 7 months ago #

    honestly I don't think is resolved but fair enough.
    Is probably some other plugin creating the error or this plugin conflicting with another one, or who knows what.
    If i will never see that this is have something to do with the plugin I will write here again just to inform.

    thank for the replay and the help

  10. Trendwerk
    Member
    Plugin Author

    Posted 7 months ago #

    Well, since there is no problem with the plugin, this issue is resolved. It DOES work in the front-end, your front-end is just broken because of other code. I cannot help you with that.

  11. anaketa
    Member
    Posted 7 months ago #

    Right, get it.
    thanks again for the help, at least I have a direction now

Reply

You must log in to post.

About this Plugin

About this Topic