Skip to:
Content
Pages
Categories
Search
Top
Bottom

In posts -> / appears unexpectedly!

  • Ok, so both my blog and forum are set up properly and working fine.

    I did some hacking to get rid of the back tick to quote option.

    So I’m posting for the fist time “I’m” and it posts as “I/’m”

    I try to find the problem and can’t.

    I end up making 3 db’s total:

    db 1) Using what I have (results in /’)

    db 2) Clean install, using only themes (results in /’)

    db 3) Clean install, no themes, no hacks nothing, just integrated with cookies (results in /’)

    Any one have any idea what’s going on?

    Both are latest releases. Everything else works fine. Integration works etc etc

    I created a new DB with clean installs of both wp and bb with the same results. Different user names, default themes etc. Nothing worked.

    tia!

Viewing 9 replies - 1 through 9 (of 9 total)

  • chrishajer
    Participant

    @chrishajer

    I did some hacking to get rid of the back tick to quote option

    I suspect this is your problem. If you undo those hacks, does the problem go away?

    If the hacking you did modified the entries in the database, and your fresh installations are still using that database, I suspect you will still see a problem.

    What hacks did you do?

    Please see above! :P

    I used a NEW (not related) db, i used both clean installs.

    So basically, the problem is reproduced on the stock installs of wp,bb with integration on mysql. So nothing, not even the themes from before were used.

    At first I thought it was because I changed the type of links (permlinks) and then did a stock install with no changes, but integration and it happened again.

    I basically did many installs under different configurations/databases. And everything ended up the same every time.

    I ruled out:

    – The theme being the problem.

    – The hacks …

    – Perm link options …

    – .htaccess …

    – The database…

    Maybe it has to do with the auth key info? That’s the only obvious thing.

    I do have wp and bb installed else where and integrated without the same problem.

    I used a generator that also generated the salt, could that be it?


    chrishajer
    Participant

    @chrishajer

    Have you tried it without integration to see if that’s causing it?

    yeah, separately it works.

    It’s not until integration.

    But it’s just so weird, why would a / be added in? Even with no modification to anything? I will try with separate auth keys and go from there.


    chrishajer
    Participant

    @chrishajer

    What is the hacking to get rid of the backtick quote problem? I’m not sure what you were trying to solve there. Was that to fix the code and backtick problem?

    The escaping of single quotes on integrated installations has been covered here before.

    Slashes being added in front of apostrophes

    Apostrophe and or quotation marks cause backslash to appear.

    https://bbpress.org/forums/topic/slash-text-issue-in-10-alpha-6-have-searched

    Sounds that that is your problem – escaping single quotes in an integrated installation. The hacking you did is unrelated (I think.) I confused backticks with quotation marks.

    I don’t think it’s related to the keys at all. They are not used that way when posting. The worst that ever happened was that bbPress did not support the complex keys (with escaped characters) that WordPress did. But that resulted in a 500 Internal Server Error.

    Thanks to zaerl this is what i did to code:

    http://pastebin.com/SAx377E4

    So yeah that’s not what is affecting this problem. I will look into the links you pasted.

    Thank you very much!

    This is what i found:

    From: https://bbpress.org/forums/topic/slashes-being-added-in-front-of-apostrophes

    User: baptiste

    Post: Easy fix (hack) in bb-includes/template-functions.php, update this function to look like this:

    function get_post_text() {

    global $bb_post;

    return stripslashes($bb_post->post_text);

    }

    May be an artifact of the wordpress integration – not sure.

    The above did indeed work. But I still looked at the other posts and problems others had.

    https://bbpress.org/forums/topic/apostrophe-and-or-quotation-marks-cause-backslash-to-appear

    user: arpowers

    ok, found the answer wooooooo!

    The ‘real’ reason this wasn’t working was….

    ‘magic_quotes_gpc’ is set to ‘off’ on my server (in php.ini)

    All these other solutions are band-aids, my hunch is that making sure magic quotes is ‘on’ is the solution.

    user: jackey

    Putting “php_value magic_quotes_gpc 1” in my .htaccess file worked for me… for now.

    The above also worked. So instead of editing the bbpress code, i just modified the .htaccess file (added to it), that 1 line fixed it. So I will go with it untill I see a problem.

    Worth noting, someone said that by changing the code as per baptiste’s method could corrupt backups you make of sql. So, that was the reason I went with the .htaccess fix.

    Thank you!

    chrishajer: you are GhettoBSD Approved!


    chrishajer
    Participant

    @chrishajer

    I saw that, but this post from sambauers led me to NOT recommend that:

    Apostrophe and or quotation marks cause backslash to appear.

    “magic_quotes_gpc should be off – always, it’s evil.”

    So, if it does not work with magic quotes on, it’s probably a bug somewhere, with the integration, and for that reason I prefer the plugin solution here:

    Apostrophe and or quotation marks cause backslash to appear.

    Not sure what’s best as I’ve never been affected by the problem and therefore never tried to fix it.

    Ok, I looked into it some more and it turns out that the reason magic_quotes_gpc is “evil” could be because it makes your server vulnerable to sql injections with malformed requests.

    So, that’s enough to not use that.

    Thanks again Chrishajer.

    You’re always welcome at my place!

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
Skip to toolbar