The Joomla! Forum ™



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.



Post new topic Reply to topic  [ 36 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Apostrophe S
PostPosted: Tue Jun 27, 2006 11:15 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jun 22, 2006 11:35 am
Posts: 15
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?


Top
 Profile  
 
 Post subject: Re: Apostrophe S
PostPosted: Tue Jun 27, 2006 11:18 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Tue Aug 23, 2005 1:02 pm
Posts: 1570
Location: Toowoomba
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


Top
 Profile  
 
 Post subject: Re: Apostrophe S
PostPosted: Tue Jun 27, 2006 11:31 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jun 22, 2006 11:35 am
Posts: 15
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.

Top
 Profile  
 
 Post subject: Re: Apostrophe S
PostPosted: Tue Jun 27, 2006 11:59 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Tue Aug 23, 2005 1:02 pm
Posts: 1570
Location: Toowoomba
Did you redo the affected text?
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


Top
 Profile  
 
 Post subject: Re: Apostrophe S
PostPosted: Wed Jun 28, 2006 12:13 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jun 22, 2006 11:35 am
Posts: 15
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.


Top
 Profile  
 
 Post subject: Re: Apostrophe S
PostPosted: Wed Jun 28, 2006 12:32 am 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Fri Apr 14, 2006 11:52 pm
Posts: 367
Location: Colorado Springs, CO
J! will automatically put that in the admin side since it is PHP [drive] 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.

_________________
Kelly Karnetsky - I make websites for various reasons
█ I run a nifty game, entertainment & tech site http://flesheatingzipper.com


Top
 Profile  
 
 Post subject: Re: Apostrophe S
PostPosted: Wed Jun 28, 2006 12:53 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jun 22, 2006 11:35 am
Posts: 15
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?


Top
 Profile  
 
 Post subject: Re: Apostrophe S
PostPosted: Wed Jun 28, 2006 5:32 pm 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Fri Apr 14, 2006 11:52 pm
Posts: 367
Location: Colorado Springs, CO
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.

_________________
Kelly Karnetsky - I make websites for various reasons
█ I run a nifty game, entertainment & tech site http://flesheatingzipper.com


Top
 Profile  
 
 Post subject: Re: Apostrophe S
PostPosted: Wed Jun 28, 2006 9:28 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jun 22, 2006 11:35 am
Posts: 15
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/index.php?option=com_content&task=section&id=5&Itemid=36


Top
 Profile  
 
 Post subject: Re: Apostrophe S
PostPosted: Wed Jun 28, 2006 10:45 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Tue Aug 23, 2005 1:02 pm
Posts: 1570
Location: Toowoomba
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.

_________________
Regards Steve, Developer of Export Content Component:
Component Information site
http://www.bestdownloadsites.com/joomla/export-content
http://www.bestdownloadsites.com


Top
 Profile  
 
 Post subject: Re: Apostrophe S
PostPosted: Wed Jun 28, 2006 11:35 pm 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Fri Apr 14, 2006 11:52 pm
Posts: 367
Location: Colorado Springs, CO
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


Top
 Profile  
 
 Post subject: Re: Apostrophe S
PostPosted: Thu Jun 29, 2006 1:03 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jun 22, 2006 11:35 am
Posts: 15
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.


Top
 Profile  
 
 Post subject: Re: Apostrophe S
PostPosted: Thu Jun 29, 2006 5:29 pm 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Fri Apr 14, 2006 11:52 pm
Posts: 367
Location: Colorado Springs, CO
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


Top
 Profile  
 
 Post subject: Re: Apostrophe S
PostPosted: Thu Jun 29, 2006 8:01 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jun 22, 2006 11:35 am
Posts: 15
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.


Top
 Profile  
 
 Post subject: Re: Apostrophe S
PostPosted: Fri Jun 30, 2006 12:28 pm 
User avatar
Joomla! Champion
Joomla! Champion

Joined: Fri Aug 19, 2005 3:03 pm
Posts: 6046
Location: Indiana, USA
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.

_________________
If you're new to Joomla, Please read Anna's Joomla! Tips: viewtopic.php?t=5503

http://nathandiehl.com | Find out what makes me tick


Top
 Profile  
 
 Post subject: Re: Apostrophe S
PostPosted: Fri Jun 30, 2006 6:06 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jun 22, 2006 11:35 am
Posts: 15
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 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 \'

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/index.php?option=com_content&task=section&id=5&Itemid=43


Last edited by suzukiman1980 on Fri Jun 30, 2006 6:20 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Apostrophe S
PostPosted: Fri Jun 30, 2006 6:43 pm 
User avatar
Joomla! Champion
Joomla! Champion

Joined: Fri Aug 19, 2005 3:03 pm
Posts: 6046
Location: Indiana, USA
can you duplicate what you're doing on the Demo site?
http://demo.joomla.org

_________________
If you're new to Joomla, Please read Anna's Joomla! Tips: viewtopic.php?t=5503

http://nathandiehl.com | Find out what makes me tick


Top
 Profile  
 
 Post subject: Re: Apostrophe S
PostPosted: Fri Jun 30, 2006 11:38 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jun 22, 2006 11:35 am
Posts: 15
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.

Image

Image


Top
 Profile  
 
 Post subject: Re: Apostrophe S
PostPosted: Sun Jul 02, 2006 5:14 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Jul 02, 2006 5:06 am
Posts: 7
Location: Surfside Beach, SC
I had the same problem and hacked a solution...

In components / com_content / content.html.php

lines 134 and 135 read:
Code:
<a href="<?php echo $link; ?>" class="category">
   <?php echo $row->name;?></a>


This needs to be changed to:

Code:
<a href="<?php echo $link; ?>" class="category">
   <?php echo stripslashes($row->name);?></a>


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

_________________
Benjamin Stookey
(CodeContractor)


Top
 Profile  
 
 Post subject: One more hack
PostPosted: Sun Jul 02, 2006 5:34 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Jul 02, 2006 5:06 am
Posts: 7
Location: Surfside Beach, SC
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

Code:
   /**
   * Writes Category
   */
   function Category( &$row, &$params ) {
      if ( $params->get( 'category' ) ) {
         ?>
         <span>
            <?php
            echo stripslashes($row->category);
            ?>
         </span>
         <?php
      }
   }


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.

_________________
Benjamin Stookey
(CodeContractor)


Top
 Profile  
 
 Post subject: Re: Apostrophe S
PostPosted: Sun Jul 02, 2006 1:06 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jun 22, 2006 11:35 am
Posts: 15
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:

Image

I appreceate the help you're giving me. Any other ideas? I have never seen anything be this stubborn before!


Top
 Profile  
 
 Post subject: Re: Apostrophe S
PostPosted: Sun Jul 02, 2006 6:37 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Jul 02, 2006 5:06 am
Posts: 7
Location: Surfside Beach, SC
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:

Code:
      if ( $params->get( 'page_title' ) ) {
         ?>
         <div class="componentheading<?php echo $params->get( 'pageclass_sfx' ); ?>">
         <?php echo stripslashes($title->name); ?>
         </div>
         <?php
      }


Once again the version is 1.0.10.

I hope that works.

_________________
Benjamin Stookey
(CodeContractor)


Top
 Profile  
 
 Post subject: Re: Apostrophe S
PostPosted: Sun Jul 02, 2006 8:12 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jun 22, 2006 11:35 am
Posts: 15
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:

Code:
      if ( $params->get( 'page_title' ) ) {
         ?>
         <div class="componentheading<?php echo $params->get( 'pageclass_sfx' ); ?>">
         <?php echo stripslashes($title->name); ?>
         </div>
         <?php
      }


Once again the version is 1.0.10.

I hope that works.





BINGO!!!!  :D

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!


Top
 Profile  
 
 Post subject: Re: Apostrophe S
PostPosted: Sun Jul 02, 2006 9:45 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jun 23, 2006 6:42 am
Posts: 19
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' ... ion-travel\'s/keyword-article-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:
   /**
   * 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
      }
   }


Any hints?

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.

Top
 Profile  
 
 Post subject: Re: Apostrophe S
PostPosted: Mon Jul 03, 2006 2:13 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Apr 20, 2006 4:17 pm
Posts: 11
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.


Top
 Profile  
 
 Post subject: Apostrophe in URL
PostPosted: Mon Jul 03, 2006 3:57 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Jul 02, 2006 5:06 am
Posts: 7
Location: Surfside Beach, SC
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

_________________
Benjamin Stookey
(CodeContractor)


Top
 Profile  
 
 Post subject: Re: Apostrophe in URL
PostPosted: Mon Jul 03, 2006 4:25 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jun 23, 2006 6:42 am
Posts: 19
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'm using SEF Advance.

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


Top
 Profile  
 
PostPosted: Mon Jul 03, 2006 5:01 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Jul 02, 2006 5:06 am
Posts: 7
Location: Surfside Beach, SC
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:

Code:
/**
 * Converts an absolute URL to SEF format
 * @param string The URL
 * @return string
 */
function sefRelToAbs( $string )


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

_________________
Benjamin Stookey
(CodeContractor)


Top
 Profile  
 
 Post subject: Re: Apostrophe S
PostPosted: Mon Jul 03, 2006 11:52 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Jul 02, 2006 5:06 am
Posts: 7
Location: Surfside Beach, SC
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

Code:
/**
* 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;


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

_________________
Benjamin Stookey
(CodeContractor)


Top
 Profile  
 
 Post subject: Re: Apostrophe S
PostPosted: Tue Jul 04, 2006 12:45 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Jan 16, 2006 3:59 am
Posts: 32
Location: USA
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

_________________
http://SuperMortgageGuide.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 36 posts ]  Go to page 1, 2  Next



Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group