×
Kunena 5.1.3 Released (19 Aug 2018)

The Kunena team has announce the arrival of Kunena 5.1.3 [K 5.1.3] which is now available for download as a native Joomla extension for J! 3.8.x. This version addresses most of the issues that were discovered in K 5.1 and issues discovered during the development stages of K 5.1. This is a maintenance release.

× This is for users to help other users, to discuss topics that are related to forum administration in general or problems in running Joomla. This is not the place to ask for Joomla support. If you want assistance with Joomla please ask at forum.joomla.org

Merged Apostrophe displaying with slash

More
5 years 1 month ago #1 by Bezman
When I type an apostrophe in category descriptions and other places in Kunena, it does not display correctly. It displays with a slash before it.

For example, "Don't be shy" displays as "Don\'t be shy". I've attached a screen capture of my forum with this phrase highlighted.

This happens with Magic Quotes turned on or off in the php.ini configuration file.

I have included my Config Report below.

Thanks in advance for guidance. I'm a newbie to Kunena and with the exception of this one issue, I've had a smooth time getting it set up.

This message contains confidential information

Database collation check: The collation of your table fields are correct

Joomla! SEF: Enabled | Joomla! SEF rewrite: Disabled | FTP layer: Disabled |

This message contains confidential information
htaccess: Exists | PHP environment: Max execution time: 30 seconds | Max execution memory: 128M | Max file upload: 100M

Kunena menu details:

Warning: Spoiler! [ Click to expand ]

Joomla default template details : protostar | author: Kyle Ledbetter | version: 1.0 | creationdate: Unknown

Kunena default template details : Blue Eagle 2.0 | author: Kunena Team | version: 3.0.0 | creationdate: 2013-05-15

Kunena version detailed: Kunena 3.0.0 | 2013-05-15 [ Wanga ]
| Kunena detailed configuration:

Warning: Spoiler! [ Click to expand ]
| Kunena integration settings:
Warning: Spoiler! [ Click to expand ]
| Joomla! detailed language files installed:
Warning: Spoiler! [ Click to expand ]

Third-party components: None

Third-party SEF components: None

Plugins: None

Modules: None

Attachments:

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

More
5 years 1 month ago #2 by sozzled
G'day, Bezman, and welcome to Kunena.

I agree that this issue involving unescaped quotes relates to magic_quotes. There's nothing particularly startling that leaps out at me from your configuration report. I will ask other members of the team to look at this and offer you their suggestions as to what you can do.

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

More
5 years 1 month ago #3 by Matias
Kunena doesn't add backslashes so it must be something else that's doing it. Are the backslashes seen when you edit the categories?

If so, try to remove those and look if they get back.

Backslashes are usually something that were used years ago to prevent SQL injections. It was fast discovered that it was a bad idea. I suppose that you've installed something into the system (bad Joomla security plugin?) that's causing this issue.

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

More
5 years 1 month ago #4 by Bezman
Thanks for the feedback. I installed the latest version of Joomla and the latest version of Kunena forum. They were both clean installs. The only other add-ons is Akeeba backup.

On my development site (MAMP on my MacBook Pro) all works as expected. On my actual server I have the escape character issue. I looked at the php settings and one thing that is clearly different is that magic_quotes is not on the list on MAMP but is on the list in the live server, though it is turned off.

I'll ask my ISP about it and update the forum if I am able to solve this.

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

More
5 years 1 month ago #5 by xillibit
Hopefully, magic quotes feature is removed since php 5.4 :), some reading : docs.joomla.org/Magic_quotes_and_security

I don't provide support by PM, because this can be useful for someone else.

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

More
5 years 1 month ago #6 by Bezman
Thank you. Great link. I have asked my host to update my PHP from 5.3.19 to 5.4. Hopefully that will fix the issue.

I also ran a few tests. I have a php.ini file to easily modify my php settings. In that file all magic_quotes settings are turned to off. If I view my PHP settings on the server, any changes I make to php.ini are displayed. In other words, the server sees the correct settings. However, Joomla still reports the old setting.

I'm not sure where Joomla is looking for the settings, or why it can't get updated to see any php settings changes. But I'll keep hacking away at it and will post on the Joomla forum as well.

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

More
5 years 1 month ago #7 by Bezman
To others who may encounter this issue... here is the solution.

First, this is not a Kunena issue. It has to do with Joomla and PHP's magic_quotes setting. If you're running PHP 5.4+ you should be ok. I'm running PHP 3.19, so I had an issue.

I combined tips from three different links to solve the problem:

docs.joomla.org/How_to_turn_off_magic_quotes_gpc_for_Joomla_3
forum.joomla.org/viewtopic.php?f=706&t=766329
docs.joomla.org/Magic_quotes_and_security

I was finally able to solve the problem by having a php.ini file that listed the following:
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
extension=pdo.so
extension=pdo_mysql.so

Then I created a .htaccess file with a single line:
SetEnv PHPRC /home/..../public_html/php.ini

Apparently the .htaccess file is what makes Joomla "see" the php.ini file. You have to set the line of code to the right path. To find the path for your setup, go to your Joomla admin panel.

Go to Global Configuration > System > System Information > [Directory Permissions].

Copy the path for your log directory (minus the /logs at the end).

Paste that path into the line of code above so the line would read something like:
SetEnv PHPRC /home/myusername/public_html/yourJ3folder

Another potential problem you may encounter is that .htaccess is an invisible file on your server, so you'll have to show hidden files in your FTP application. MAKE A COPY OF THE ORIGINAL .htaccess file before overwriting it. I made errors and it broke my site. Fortunately I had a copy to go back to.

I hope these tips help you save the 2.5 hours of anguish I went through to solve this silly issue! :)
The following user(s) said Thank You: Matias, jonmortimer

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

More
5 years 1 month ago #8 by southga
I was writing a post today and noticed that backslashes are being inserted when I use apostrophes. I'm using the JCE editor, and none of my Joomla articles are experiencing this bug. It's just happening in my Forum posts.



Here's my configuration report:
This message contains confidential information

Database collation check: The collation of your table fields are correct

Joomla! SEF: Enabled | Joomla! SEF rewrite: Disabled | FTP layer: Disabled |

This message contains confidential information
htaccess: Exists | PHP environment: Max execution time: 30 seconds | Max execution memory: 256M | Max file upload: 64M

Kunena menu details:

Warning: Spoiler! [ Click to expand ]

Joomla default template details : TheAuthorsClub | author: Chris Brown | version: 1.0 | creationdate: Unknown

Kunena default template details : Blue Eagle 2.0 | author: Kunena Team | version: 3.0.0 | creationdate: 2013-05-15

Kunena version detailed: Kunena 3.0.0 | 2013-05-15 [ Wanga ]
| Kunena detailed configuration:

Warning: Spoiler! [ Click to expand ]
| Kunena integration settings:
Warning: Spoiler! [ Click to expand ]
| Joomla! detailed language files installed:
Warning: Spoiler! [ Click to expand ]

Third-party components: None

Third-party SEF components: None

Plugins: None

Modules: None

Attachments:

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

More
5 years 1 month ago - 5 years 1 month ago #9 by sozzled
*** Topics merged ***

Thank you for your question (this is the second time this week we have received a question on this issue) about unescaped apostrophes - the result of magic quotes - appearing in a user's forum. This topic explains what you need to do.
Last edit: 5 years 1 month ago by sozzled.

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

More
5 years 1 month ago #10 by southga
I spoke with my host's tech support and he upgraded my site to PHP 5.4, but the backslashes are still in the forum posts. Can you offer any more advice?

Thanks!

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

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to add attachements.
  • Not Allowed: to edit your message.
Time to create page: 0.253 seconds