Apostrophe S
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
-
- Joomla! Apprentice
- Posts: 15
- Joined: Thu Jun 22, 2006 11:35 am
Apostrophe S
Good day everyone.
I am a total Joomla! n00b but I have been recruited to build a website for my church. Everything has gone well until now but I've run into a problem I can't figure out.
I am creating a category called "Children's Ministries" under the section "Ministries". I have triple checked everything and nothing I do gets rid of the glitch. "Children's Ministries" appears as "Children/'s Ministries". Note the backslash before the apostrophe.
I have tried deleting the category and crating a new one and not even that solves the issue. Any suggestions?
I am a total Joomla! n00b but I have been recruited to build a website for my church. Everything has gone well until now but I've run into a problem I can't figure out.
I am creating a category called "Children's Ministries" under the section "Ministries". I have triple checked everything and nothing I do gets rid of the glitch. "Children's Ministries" appears as "Children/'s Ministries". Note the backslash before the apostrophe.
I have tried deleting the category and crating a new one and not even that solves the issue. Any suggestions?
- Steve
- Joomla! Ace
- Posts: 1570
- Joined: Tue Aug 23, 2005 1:02 pm
- Location: Toowoomba
- Contact:
Re: Apostrophe S
Try turning of the editor in global Configurations
Regards Steve, Developer of Export Content Component:
Component Information site
http://www.bestdownloadsites.com/joomla/export-content
http://www.bestdownloadsites.com
Component Information site
http://www.bestdownloadsites.com/joomla/export-content
http://www.bestdownloadsites.com
-
- Joomla! Apprentice
- Posts: 15
- Joined: Thu Jun 22, 2006 11:35 am
Re: Apostrophe S
Ok, changed the global config and no result. Same problem.
Last edited by suzukiman1980 on Tue Jun 27, 2006 11:37 pm, edited 1 time in total.
- Steve
- Joomla! Ace
- Posts: 1570
- Joined: Tue Aug 23, 2005 1:02 pm
- Location: Toowoomba
- Contact:
Re: Apostrophe S
Did you redo the affected text?
What version of Joomla are you running?
What version of Joomla are you running?
Regards Steve, Developer of Export Content Component:
Component Information site
http://www.bestdownloadsites.com/joomla/export-content
http://www.bestdownloadsites.com
Component Information site
http://www.bestdownloadsites.com/joomla/export-content
http://www.bestdownloadsites.com
-
- Joomla! Apprentice
- Posts: 15
- Joined: Thu Jun 22, 2006 11:35 am
Re: Apostrophe S
I totally rewrote the text. The only place I am having the problem is in the category name. When I type "Children's" in the text field for the body of the description I don't have any problem, it displays like it should.
I am using v1.08 with JCE as the text editor, but it makes no difference which editor I use.
I am using v1.08 with JCE as the text editor, but it makes no difference which editor I use.
- midwestkel
- Joomla! Explorer
- Posts: 367
- Joined: Fri Apr 14, 2006 11:52 pm
- Location: Colorado Springs, CO
- Contact:
Re: Apostrophe S
J! will automatically put that in the admin side since it is PHP driven you need to put a "/" in front of " ' " Thats normal and will not show the "/" on the front end.
If you need anything else please let us know.
If you need anything else please let us know.
█ Kelly Karnetsky - I make websites for various reasons
█ I run a nifty game, entertainment & tech site http://flesheatingzipper.com
█ I run a nifty game, entertainment & tech site http://flesheatingzipper.com
-
- Joomla! Apprentice
- Posts: 15
- Joined: Thu Jun 22, 2006 11:35 am
Re: Apostrophe S
I've tried typing in "Children/'s", "Children\'s", "Children\s", "Children/s" with no positive results.
Result of "Children/'s" ----- "Children/\'s"
Result of "Children\'s" ----- "Children\\\'s"
Result of "Children\s" ----- "Children\\s"
Result of "Children/s" ----- "Children/s"
Any suggestions?
Result of "Children/'s" ----- "Children/\'s"
Result of "Children\'s" ----- "Children\\\'s"
Result of "Children\s" ----- "Children\\s"
Result of "Children/s" ----- "Children/s"
Any suggestions?
- midwestkel
- Joomla! Explorer
- Posts: 367
- Joined: Fri Apr 14, 2006 11:52 pm
- Location: Colorado Springs, CO
- Contact:
Re: Apostrophe S
No just put
Children's
It will look like
Children/'s
on the admin side but on the front end it will look like the first one.
Children's
It will look like
Children/'s
on the admin side but on the front end it will look like the first one.
█ Kelly Karnetsky - I make websites for various reasons
█ I run a nifty game, entertainment & tech site http://flesheatingzipper.com
█ I run a nifty game, entertainment & tech site http://flesheatingzipper.com
-
- Joomla! Apprentice
- Posts: 15
- Joined: Thu Jun 22, 2006 11:35 am
Re: Apostrophe S
midwestkel wrote: No just put
Children's
It will look like
Children/'s
on the admin side but on the front end it will look like the first one.
It looks like Children\'s on both the front end and the back end. Here's what I'm looking at:
http://northshoreassembly.org/nsag2/ind ... &Itemid=36
- Steve
- Joomla! Ace
- Posts: 1570
- Joined: Tue Aug 23, 2005 1:02 pm
- Location: Toowoomba
- Contact:
Re: Apostrophe S
Try upgrading to the latest version http://forum.joomla.org/index.php/topic,71966.0.html and see if that fixes it.
You only need to overwrite your files so it want affect the content you have entered.
You only need to overwrite your files so it want affect the content you have entered.
Regards Steve, Developer of Export Content Component:
Component Information site
http://www.bestdownloadsites.com/joomla/export-content
http://www.bestdownloadsites.com
Component Information site
http://www.bestdownloadsites.com/joomla/export-content
http://www.bestdownloadsites.com
- midwestkel
- Joomla! Explorer
- Posts: 367
- Joined: Fri Apr 14, 2006 11:52 pm
- Location: Colorado Springs, CO
- Contact:
Re: Apostrophe S
I see what your saying I haven't had that problem and I am on 1.0.8
█ Kelly Karnetsky - I make websites for various reasons
█ I run a nifty game, entertainment & tech site http://flesheatingzipper.com
█ I run a nifty game, entertainment & tech site http://flesheatingzipper.com
-
- Joomla! Apprentice
- Posts: 15
- Joined: Thu Jun 22, 2006 11:35 am
Re: Apostrophe S
Ok, I updated from 1.0.08 to 1.0.10 and what you see is still there. There seems to be some sort of glitch with the ' in any title. I tried it on another title and it did the same thing although it doesn't happen in the body of a paragraph.
- midwestkel
- Joomla! Explorer
- Posts: 367
- Joined: Fri Apr 14, 2006 11:52 pm
- Location: Colorado Springs, CO
- Contact:
Re: Apostrophe S
Man beats me I tried to see if it would happen to me and it didnt. I would PM a moderator to see if they know about it.
█ Kelly Karnetsky - I make websites for various reasons
█ I run a nifty game, entertainment & tech site http://flesheatingzipper.com
█ I run a nifty game, entertainment & tech site http://flesheatingzipper.com
-
- Joomla! Apprentice
- Posts: 15
- Joined: Thu Jun 22, 2006 11:35 am
Re: Apostrophe S
I'll do that.
Odd, isn't it? I've never seen anything like it before.
Thx for your help. If I can get a resolution to the issue I will definately post it.
Odd, isn't it? I've never seen anything like it before.
Thx for your help. If I can get a resolution to the issue I will definately post it.
- nathandiehl
- Joomla! Champion
- Posts: 6044
- Joined: Fri Aug 19, 2005 3:03 pm
- Location: Indiana, USA
- Contact:
Re: Apostrophe S
see this link:
http://northshoreassembly.org/nsag2/ind ... &Itemid=40
there are five apostrophes here, and all look good--including three Children's Ministry that was in question.
Have you cleared teh cache? (from backend, system-->clear all cache --if the option isn't there, it isn't enabled, which is okay)
If still an issue, i would recommend:
1. create a new, different category (same section as Children's Ministry)
2. copy all content items over from old category to new category
3. re-create menu item links to the new category, deleting old ones
4. delete old category.
hope this helps. certainly an odd issue.
http://northshoreassembly.org/nsag2/ind ... &Itemid=40
there are five apostrophes here, and all look good--including three Children's Ministry that was in question.
Have you cleared teh cache? (from backend, system-->clear all cache --if the option isn't there, it isn't enabled, which is okay)
If still an issue, i would recommend:
1. create a new, different category (same section as Children's Ministry)
2. copy all content items over from old category to new category
3. re-create menu item links to the new category, deleting old ones
4. delete old category.
hope this helps. certainly an odd issue.
If you're new to Joomla, Please read Anna's Joomla! Tips: http://forum.joomla.org/viewtopic.php?t=5503
http://nathandiehl.com | Find out what makes me tick
http://nathandiehl.com | Find out what makes me tick
-
- Joomla! Apprentice
- Posts: 15
- Joined: Thu Jun 22, 2006 11:35 am
Re: Apostrophe S
I checked and the server cache option is off. I cleared my browser cache in both IE and Firefox again before viewing the pages that have the problem and I still see \'nathandiehl wrote: see this link:
http://northshoreassembly.org/nsag2/ind ... &Itemid=40
there are five apostrophes here, and all look good--including three Children's Ministry that was in question.
Have you cleared teh cache? (from backend, system-->clear all cache --if the option isn't there, it isn't enabled, which is okay)
If still an issue, i would recommend:
1. create a new, different category (same section as Children's Ministry)
2. copy all content items over from old category to new category
3. re-create menu item links to the new category, deleting old ones
4. delete old category.
hope this helps. certainly an odd issue.
I created a new Children's Ministries category, made new menu links, moved the content, and deleted the old category and the problem still exists. I'm out of ideas, aside from being grammatically incorrect and use "Childrens" instead of "Children's".
EDIT: I have tried adding a different category named "Men's Ministries" and I have the same problem. You can see it here:
http://northshoreassembly.org/nsag2/ind ... &Itemid=43
Last edited by suzukiman1980 on Fri Jun 30, 2006 6:20 pm, edited 1 time in total.
- nathandiehl
- Joomla! Champion
- Posts: 6044
- Joined: Fri Aug 19, 2005 3:03 pm
- Location: Indiana, USA
- Contact:
Re: Apostrophe S
can you duplicate what you're doing on the Demo site?
http://demo.joomla.org
http://demo.joomla.org
If you're new to Joomla, Please read Anna's Joomla! Tips: http://forum.joomla.org/viewtopic.php?t=5503
http://nathandiehl.com | Find out what makes me tick
http://nathandiehl.com | Find out what makes me tick
-
- Joomla! Apprentice
- Posts: 15
- Joined: Thu Jun 22, 2006 11:35 am
Re: Apostrophe S
Yes, it seems to be doing it on the demo site as well. I created a category under News named "NSAG's Test". See the screenshots below.
-
- Joomla! Apprentice
- Posts: 7
- Joined: Sun Jul 02, 2006 5:06 am
- Location: Surfside Beach, SC
- Contact:
Re: Apostrophe S
I had the same problem and hacked a solution...
In components / com_content / content.html.php
lines 134 and 135 read:
This needs to be changed to:
Is there a way to communicate this to the dev team to let them know because this is a change they should make to the release?
-Ben
In components / com_content / content.html.php
lines 134 and 135 read:
Code: Select all
<a href="<?php echo $link; ?>" class="category">
<?php echo $row->name;?></a>
Code: Select all
<a href="<?php echo $link; ?>" class="category">
<?php echo stripslashes($row->name);?></a>
-Ben
Benjamin Stookey
(CodeContractor)
(CodeContractor)
-
- Joomla! Apprentice
- Posts: 7
- Joined: Sun Jul 02, 2006 5:06 am
- Location: Surfside Beach, SC
- Contact:
One more hack
I noticed that the same problem occurs if you show the category below the title of a content item.
You just have to add the stripslashes function to this function at line 777.
joomla version: 1.0.10
I'll add here that I'm going to add a class to the span for my own use. I would recomend it for customization in the future.
You just have to add the stripslashes function to this function at line 777.
joomla version: 1.0.10
Code: Select all
/**
* Writes Category
*/
function Category( &$row, &$params ) {
if ( $params->get( 'category' ) ) {
?>
<span>
<?php
echo stripslashes($row->category);
?>
</span>
<?php
}
}
Benjamin Stookey
(CodeContractor)
(CodeContractor)
-
- Joomla! Apprentice
- Posts: 15
- Joined: Thu Jun 22, 2006 11:35 am
Re: Apostrophe S
Well, that got me closer!!
I'm still having problems with the category name when it displays the content items in the category. See screenshot below:
I appreceate the help you're giving me. Any other ideas? I have never seen anything be this stubborn before!
I'm still having problems with the category name when it displays the content items in the category. See screenshot below:
I appreceate the help you're giving me. Any other ideas? I have never seen anything be this stubborn before!
-
- Joomla! Apprentice
- Posts: 7
- Joined: Sun Jul 02, 2006 5:06 am
- Location: Surfside Beach, SC
- Contact:
Re: Apostrophe S
I can't seem to duplicate that problem myself. Are you sure you haven't got the slash in the title itself?
You can try the following hack at line 44 of the same file:
Once again the version is 1.0.10.
I hope that works.
You can try the following hack at line 44 of the same file:
Code: Select all
if ( $params->get( 'page_title' ) ) {
?>
<div class="componentheading<?php echo $params->get( 'pageclass_sfx' ); ?>">
<?php echo stripslashes($title->name); ?>
</div>
<?php
}
I hope that works.
Benjamin Stookey
(CodeContractor)
(CodeContractor)
-
- Joomla! Apprentice
- Posts: 15
- Joined: Thu Jun 22, 2006 11:35 am
Re: Apostrophe S
codecontractor wrote: I can't seem to duplicate that problem myself. Are you sure you haven't got the slash in the title itself?
You can try the following hack at line 44 of the same file:
Once again the version is 1.0.10.Code: Select all
if ( $params->get( 'page_title' ) ) { ?> <div class="componentheading<?php echo $params->get( 'pageclass_sfx' ); ?>"> <?php echo stripslashes($title->name); ?> </div> <?php }
I hope that works.
BINGO!!!!
Ben, you nailed it!!!! That was the final solution to remove the slash. Truely I am in the presence of greatness!
Thank you so much. You da man!
-
- Joomla! Apprentice
- Posts: 19
- Joined: Fri Jun 23, 2006 6:42 am
Re: Apostrophe S
CodeContractor....
Thanks so much ... I made the changes you suggested (at least I think I did), but I'm still having ONE problem:
1) Hover over "Keyword Article 1's" (where you see one of the places the solution IS working) and you'll see this path:
http://recreationdigest.com/recreation' ... e-1's.html
"recreation-travel's" is the category. (recreation's is the section)...
Here's what I think is the relevant code section:
Any hints?
THANKS!
(oh, I'm using 1.0.8 )
Thanks so much ... I made the changes you suggested (at least I think I did), but I'm still having ONE problem:
1) Hover over "Keyword Article 1's" (where you see one of the places the solution IS working) and you'll see this path:
http://recreationdigest.com/recreation' ... e-1's.html
"recreation-travel's" is the category. (recreation's is the section)...
Here's what I think is the relevant code section:
Code: Select all
/**
* Writes Section
*/
function Section( $row, $params ) {
if ( $params->get( 'section' ) ) {
?>
<span>
<?php
echo stripslashes($row->section);
// writes dash between section & Category Name when both are active
if ( $params->get( 'category' ) ) {
echo ' - ';
}
?>
</span>
<?php
}
}
/**
* Writes Category
*/
function Category( $row, $params ) {
if ( $params->get( 'category' ) ) {
?>
<span>
<?php
echo stripslashes($row->category);
?>
</span>
<?php
}
}
THANKS!
(oh, I'm using 1.0.8 )
Last edited by sashen on Sun Jul 02, 2006 10:02 pm, edited 1 time in total.
-
- Joomla! Apprentice
- Posts: 11
- Joined: Thu Apr 20, 2006 4:17 pm
Re: Apostrophe S
The problem is further upstream.
I have exactly the same problem (maybe Joomla doesn't like Children's Ministries ). Creating a new category didn't solve the problem, I had the same thing happen again.
When I look in the database, jos_categories table, I found the title was stored as "Children\'s Ministries". Going in and taking out the backslash in the data solved the problem.
Of course, you don't want to be doing that all the time, but it says to me that somewhere there are too many addslashes before the title gets stored - "Children's" gets changed to "Children\'s" correctly but then, somehow that gets changed to "Children\\\'s" before the text is written to the database.
FWIW, I also tried deleting the category when it still had content and I got an error message that "Children\\\\\\\'s Ministry" still had content - talk about addslash overload!
I also see that categories created by DocMan don't have the extra slash. Maybe there's a hint in there.
I'll try to hunt around in the source, but I thought I'd toss this out to those who know their way around it a little better.
I have exactly the same problem (maybe Joomla doesn't like Children's Ministries ). Creating a new category didn't solve the problem, I had the same thing happen again.
When I look in the database, jos_categories table, I found the title was stored as "Children\'s Ministries". Going in and taking out the backslash in the data solved the problem.
Of course, you don't want to be doing that all the time, but it says to me that somewhere there are too many addslashes before the title gets stored - "Children's" gets changed to "Children\'s" correctly but then, somehow that gets changed to "Children\\\'s" before the text is written to the database.
FWIW, I also tried deleting the category when it still had content and I got an error message that "Children\\\\\\\'s Ministry" still had content - talk about addslash overload!
I also see that categories created by DocMan don't have the extra slash. Maybe there's a hint in there.
I'll try to hunt around in the source, but I thought I'd toss this out to those who know their way around it a little better.
-
- Joomla! Apprentice
- Posts: 7
- Joined: Sun Jul 02, 2006 5:06 am
- Location: Surfside Beach, SC
- Contact:
Apostrophe in URL
Sashen,
What SEO tool are you using? It's obviously not the standard SEF links because those are written:
content/category/1/1/2/
It sounds like the problem is in the tool that generates the links...
-Ben
What SEO tool are you using? It's obviously not the standard SEF links because those are written:
content/category/1/1/2/
It sounds like the problem is in the tool that generates the links...
-Ben
Benjamin Stookey
(CodeContractor)
(CodeContractor)
-
- Joomla! Apprentice
- Posts: 19
- Joined: Fri Jun 23, 2006 6:42 am
Re: Apostrophe in URL
I'm using SEF Advance.codecontractor wrote: Sashen,
What SEO tool are you using? It's obviously not the standard SEF links because those are written:
content/category/1/1/2/
It sounds like the problem is in the tool that generates the links...
-Ben
I don't think that's causing the problem since the solution codecontractor gave worked everywhere but that ONE place... it worked in the Section part of the URL link, e.g.
-Sashen
-
- Joomla! Apprentice
- Posts: 7
- Joined: Sun Jul 02, 2006 5:06 am
- Location: Surfside Beach, SC
- Contact:
The problem is in SEF Advance
The code I edited above solved the problem within the content component of the site. This doesn't solve the problem when it comes to SEF links. This is because of a function called sefRelToAbs:
You may notice it is called above. This function strips the GET text from the url and converts it to SEF format (with /'s).
I don't know, but I assume that the SEF Advance component overrides this function and then queries the database for the names associated with the ID's of the categories, sections, and content items. I'm not going to pay 40 quid to check for you though.
Anyway, the com_content component doesn't write the SEF url. SEF Advance does and gets the category name directly from the DB so the stripslashes function is missing somewhere in Emir Sakic's code. I suggest you bring it up with him.
-Ben
Code: Select all
/**
* Converts an absolute URL to SEF format
* @param string The URL
* @return string
*/
function sefRelToAbs( $string )
I don't know, but I assume that the SEF Advance component overrides this function and then queries the database for the names associated with the ID's of the categories, sections, and content items. I'm not going to pay 40 quid to check for you though.
Anyway, the com_content component doesn't write the SEF url. SEF Advance does and gets the category name directly from the DB so the stripslashes function is missing somewhere in Emir Sakic's code. I suggest you bring it up with him.
-Ben
Benjamin Stookey
(CodeContractor)
(CodeContractor)
-
- Joomla! Apprentice
- Posts: 7
- Joined: Sun Jul 02, 2006 5:06 am
- Location: Surfside Beach, SC
- Contact:
Re: Apostrophe S
Ok, well I see part of the problem...
In the DB apostrophes are handled differently between categories and sections.
That is, if you create a new Section with an apostrophe in it there are no slashes in the jos_sections table, but if you create a new Category with an apostrophe it is stored as /' in the jos_categories table. They do this explicitly in the code for categories, but not for Sections and I haven't been able to figure out why. Things seem to work fine if you remove the apostrophes in the DB though.
I've made a small change in administrator/components/com_categories/admin.categories.php
This stops the category from being saved in the DB with the slash. I've tested this a little, but I can't guarantee that this doesn't seriously damage the system...
I would recommend going directly into your db and adjusting the jos_categories table to remove the /' in title and name to test things first. Then, if your site still works, make the changes in the code.
I would also recommend uninstalling/reinstalling SEF Advance -- and I don't know why, but that worked for me on my test system.
-Ben
joomla version: 1.0.10
In the DB apostrophes are handled differently between categories and sections.
That is, if you create a new Section with an apostrophe in it there are no slashes in the jos_sections table, but if you create a new Category with an apostrophe it is stored as /' in the jos_categories table. They do this explicitly in the code for categories, but not for Sections and I haven't been able to figure out why. Things seem to work fine if you remove the apostrophes in the DB though.
I've made a small change in administrator/components/com_categories/admin.categories.php
Code: Select all
/**
* Saves the catefory after an edit form submit
* @param string The name of the category section
*/
function saveCategory( $task ) {
....
....
// $row->title = addslashes( $row->title );
// $row->name = addslashes( $row->name );
$row->title = $row->title;
$row->name = $row->name;
I would recommend going directly into your db and adjusting the jos_categories table to remove the /' in title and name to test things first. Then, if your site still works, make the changes in the code.
I would also recommend uninstalling/reinstalling SEF Advance -- and I don't know why, but that worked for me on my test system.
-Ben
joomla version: 1.0.10
Benjamin Stookey
(CodeContractor)
(CodeContractor)
-
- Joomla! Apprentice
- Posts: 32
- Joined: Mon Jan 16, 2006 3:59 am
- Location: USA
- Contact:
Re: Apostrophe S
Hi, glad I ran across this thread. I noticed the same issue with apostrophes before and simply changed the name of the catagory so it didn't use an apostrophe. (Not very technical, I know, but I'm really uncomfortable messing with code.) I simply named it back to recreate the issue.
In case this is of help, I'm not using any SEF other than Joomla's built-in version.
Joomla! version 1.0.8
Community Builder
JCE
Joomap
JoomlaBoard
JoomlaExplorer
Sorry, but the code hacking thing is way over my head.
HTH
In case this is of help, I'm not using any SEF other than Joomla's built-in version.
Joomla! version 1.0.8
Community Builder
JCE
Joomap
JoomlaBoard
JoomlaExplorer
Sorry, but the code hacking thing is way over my head.
HTH