The MU forums have moved to WordPress.org

Adding-block: update impossible with % character (17 posts)

  1. apelletier
    Member
    Posted 14 years ago #

    When I create a new block with "%BLOGNAME%" in it, it works fine.

    But if I try to add "%BLOGNAME%" in a block after creation (an update) it get an error and the block is not updated.

    The problem is with the % character.

    Anyone with a quick fix?

    Thanks

    Aurélien

  2. andrea_r
    Moderator
    Posted 14 years ago #

    Where are you doing this?

  3. apelletier
    Member
    Posted 14 years ago #

    In the administration menu of this plugin adding-block

  4. kgraeme
    Member
    Posted 14 years ago #

    You'd need to contact the developer of that plugin.

  5. apelletier
    Member
    Posted 14 years ago #

    In the zip file of that the plugin the developper says to post in WPMU forum for support ;)

  6. illutic
    Member
    Posted 14 years ago #

    That's the only thing you add (%BLOGNAME%)? What version of Adding Blocks and WPMU are you using?

  7. apelletier
    Member
    Posted 14 years ago #

    Just % won't work

    WPMU 2.8.4 and adding-blocks 1.3 (the one on wpmudev)

    Very usefull plugin by the way.

  8. illutic
    Member
    Posted 14 years ago #

    Okay, thanks. I'll look into it :)

  9. DeannaS
    Member
    Posted 14 years ago #

    I tested it as well.... one thing I noticed in the code is that in the insert you're not using prepare, and in the update you are, but you're not actually passing substitution variables... But, I'm not sure if that is the cause or not.

  10. apelletier
    Member
    Posted 14 years ago #

    It works when removing the call to $wpdp->prepare

    Thanks

  11. DeannaS
    Member
    Posted 14 years ago #

    It's better (safer) to use prepare, it just wasn't being used correctly....

  12. illutic
    Member
    Posted 14 years ago #

    @DeannaS thanks for noticing (I hadn't noticed it yet).

  13. tim.moore
    Member
    Posted 14 years ago #

    illutic,

    It looks like you are enclosing your $_POST variables with { ... } during an update but not during an insert. Not sure if this would cause it, but it's something to look at.

    Tim

  14. illutic
    Member
    Posted 14 years ago #

    Hi Tim,

    I just solved the issue (and also saw that and included insert in brackets too). Uploading the new version right now :)

    Please let me know if this fixes the issue for you too.

    - Hiranthi

  15. apelletier
    Member
    Posted 14 years ago #

    The issue is fixed for me.

    Thanks

  16. frankeyboard
    Member
    Posted 14 years ago #

    Hi Hiranthi,
    I'm trying to configure the plugin and everything is clear. I create my block, I configure the conditional options but I do not understand how to define the place where the block appears.
    What I get is that the block appears at the bottom of the page just before the closing of the body tag.
    What I want to do is to put my block automatically in the sidebar of all subdomains (obviously I use themes with sidebar).
    Is it possible from the configuration options or I need to manually change all the themes?

  17. frankeyboard
    Member
    Posted 14 years ago #

    Hi guys,
    no suggest for my last question? :(

About this Topic

  • Started 14 years ago by apelletier
  • Latest reply from frankeyboard