Keyword

K2Story Issue - K2 items not saving in database!

  • Tessa Mero
  • Tessa Mero's Avatar Topic Author
  • Offline
  • New Member
More
11 years 11 months ago #106061 by Tessa Mero

William White wrote: I created an account with the k2 user login, added an item w k2 story, captua, then submit, all worked as expected from front end for me. Please check backend



Hi William,

I just realized the saving issue has nothing to do with the user accounts of whether they were registered before or after installation of k2 Story.

It happens with all users, only if you try to insert links or anything extra besides plain text in the article. That's when it doesn't save.

Any ideas? Could you please test this? :-)

By the way, thank you in advance for taking the time to continuing on troubleshooting this weird bug.

Please Log in or Create an account to join the conversation.

  • Tessa Mero
  • Tessa Mero's Avatar Topic Author
  • Offline
  • New Member
More
11 years 11 months ago #106062 by Tessa Mero
Actually I found the issue!!! After a crap load of article testing!


If I type in one word in k2story that has an apostrophe in it, it doesn't save. Such as this: testing's


WHy would they build k2story like that? Unless there is something overriding it?

Please Log in or Create an account to join the conversation.

  • Tessa Mero
  • Tessa Mero's Avatar Topic Author
  • Offline
  • New Member
More
11 years 11 months ago #106063 by Tessa Mero
Alright issue is fixed.


Required a ton of php bug fixing throughout the k2 story code.

This is an actual bug on the extension because I had this tested on fresh new sites and the issue still persisted.

I will contact k2 story with the code changes so they can update their extension.

Please Log in or Create an account to join the conversation.

More
11 years 11 months ago #106064 by william white
Replied by william white on topic Re: K2Story Issue - K2 items not saving in database!
Please share the bugs and fixes

Please Log in or Create an account to join the conversation.

  • Tessa Mero
  • Tessa Mero's Avatar Topic Author
  • Offline
  • New Member
More
11 years 10 months ago #106065 by Tessa Mero

William White wrote: Please share the bugs and fixes


Hi William,

The fix was by adding the "addslashes" in front of all the variables of that textbox field to "escape" the quotes.

The queries are created with single quotes, so if you put a single quote in the textbox, it breaks it and doesn't update in database.

I have contacted the developer, tried to email him , skype him, no responses, so I had to work with a professional to go through this issue.


The problem with using addslashes is if you are on an older server with magic quotes on, this may conflict. So he probably had bug reports and was able to fix it by removing addslashes to the variable in jesubmit.php.

So this exact new code I have won't work for anyone unless you are on a newer server, since they default to magic quotes being off in the ini file.

This is my 2 cents. :-)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum