ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Dot in url_title not working in some channels

February 23, 2012 9:42pm

Subscribe [2]
  • #1 / Feb 23, 2012 9:42pm

    Tyas

    35 posts

    Hello everyone,

    I have a little problem about dot (.) in url_titles. ex:
    1. http://autozmart.com/merchant/info/5437/pt._toyota_astra_motor_toyota (NOT WORKING)
    2. http://autozmart.com/bekas/info/C388/3739/toyota_harrier_2.4_l_premium (WORKING)

    Both examples are ini different channel, do i miss something in setting the channel?

    Help ;D

    regards,
    tyas

  • #2 / Feb 24, 2012 5:02pm

    Dan Decker

    7338 posts

    Hi Tyas,

    I’m sorry to see this behaving inconsistently for you. Let’s see if we can figure out what is happening here.

    Your second example includes a category ID number in the URL, C388 and your first URL does not. As a test, I added the same thing to the first URL, and it no longer directed to 404

    http://autozmart.com/merchant/info/C388/5437/pt._toyota_astra_motor_toyota

    So, I think the issue has to do the way your URLs are being built differently, rather than the dot.

    Can you explain your URL structure to me? Perhaps that will give us some clues.

    Cheers,

     

  • #3 / Mar 04, 2012 6:02am

    Tyas

    35 posts

    1. http://autozmart.com/merchant/info/5437/pt._toyota_astra_motor_toyota (NOT WORKING)

    This entry come from Main Control Panel and it always not working with the dot. Sometimes we forgot to change the url_title from title ex. PT. Toyota Astra Motor

    2. http://autozmart.com/bekas/info/C388/3739/toyota_harrier_2.4_l_premium (WORKING)

    This entry come form member profile with safecracker. no problem at all.

    Your second example includes a category ID number in the URL, C388 and your first URL does not. As a test, I added the same thing to the first URL, and it no longer directed to 404

    3. http://autozmart.com/bekas/info/C208/6183/trial_car_advertisment_using_dot._is_it_working

    Iam trying this entry from Main COntrol Panel and its working! so is it because the category ID the dot url is working? unfortunately my first URL can’t use category ID:roll:

    Oke thanks for your answer Dan,

    regards
    Tyas

  • #4 / Mar 05, 2012 6:48pm

    Sean C. Smith

    3818 posts

    Tyas,

    I think I see what’s happening.

    not working
    http://autozmart.com/merchant/info/5437/pt._toyota_astra_motor_toyota

    however if I remove the segment containing 5437
    http://autozmart.com/merchant/info/pt._toyota_astra_motor_toyota

    The page resolves correctly. Is 5437 the entry_id? If so then what you have is a url with both an entyr_id and an url_title - only one is necessary.

    Could you post up the code that is creating links to this page?

    Sean

  • #5 / Mar 29, 2012 10:39am

    Tyas

    35 posts

    Hi Sean,

    This is my first expression engine and its my fault to create {entry_id}/{url_title} and make it double. I already change a few mistakes like that, but still got error.

    this is the error in categories channel:
    1. http://autozmart.com/baru/info/C617/honda_jazz_all_new_jazz_rs—> WORKING
    2. http://autozmart.com/baru/info/C387/toyota_fortuner_2.5_g_diesel1—> not working
    2. http://autozmart.com/baru/info/C387/{entry_id}/toyota_fortuner_2.5_g_diesel1—> WORKING

    3. http://autozmart.com/artikel/info/6934/wow._mercedes-benz_sl600_renntech_kinclong—> not working
    4. http://autozmart.com/artikel/info/wow._mercedes-benz_sl600_renntech_kinclong—> not working

    My conclution: dot url only work in {category_id}/{entry_id}/dot_.url

    Is this a bug? or something wrong with my setting, I am using 2.3.0

  • #6 / Mar 29, 2012 10:46am

    Tyas

    35 posts

    I think if this is a bug, the solution is pretty easy for ee-developer (not me) that change the . to _ in every url_title in title entry automatically.

  • #7 / Apr 02, 2012 5:59pm

    Dan Decker

    7338 posts

    Hi Tyas,

    If it was a bug, it would be address in the latest release, ExpressionEngine 2.4

    ExpressionEngine only needs the url_title, where “.” are allowed, or the entry ID. Using both can cause EE to be confused if the url_title and the entry_id do not point to the same entry.

    In your example 2 and 3 links above, you have category information “C617” mixed with url_titles, also not ideal.

    I’m really interested in helping you make the most of using ExpressionEngine! Can you please post the template code for your baru/info and article/info templates here to the forums? I can then go through those and offer suggestions on how you can get consistent results!

    Cheers,

  • #8 / Apr 03, 2012 6:30am

    Tyas

    35 posts

    ExpressionEngine only needs the url_title, where “.” are allowed, or the entry ID. Using both can cause EE to be confused if the url_title and the entry_id do not point to the same entry.

    both entry_id and url_title are point in the same entry. I will delete the entry_id soon after finish a few work if EE think its confusing.

    This is artikel/info
    sample: http://autozmart.com/artikel/info/4416/ternyata_vellfire_keren_juga_dimodifikasi

    {html_head}
     {exp:seo_lite url_title="{segment_4}"}
    
    {new_global_stylesheets}
    
    {rss} 
    {favicon}
    {fancybox}
    {html_head_end} 
    <body>
    
     {heading_begin}
      {embed="new_global_embeds/.top_nav" loc="home"}
     {heading_end}
    
    {subheader}
    {wrapper_begin}
    
    
    <div class="container_24">
    
    <div class="grid_18 alpha">
    <div class="latar_grey">
    
    {exp:channel:entries channel="artikel" entry_id="{segment_3}" status="open|featured" relaxed_categories="yes"}
      
     {if no_results}No Results{/if}
    
      <div class="small thin">Artikel oleh {author} pada {entry_date format="%d %F %Y"} | {entry_date format="%G:%i"} WIB | {categories show_group="7"}<a href="http://{path=artikel/direktori}/{category_url_title}">{category_name}</a>{/categories}</div>
    
      <hr >
    
      {exp:channel_images:images entry_id="{entry_id}" limit="1"}
       {image:url:large}
    
       <div class="small quiet right">{if '{image:description}'!=no_results}Keterangan: {image:description}{/if}</div>
    
       <div>
              {image:paginate}
                      Gambar ke-{image:current_page} dari {image:total_pages} gambar {image:pagination_links}  
              {/image:paginate}
       </div>
    
      {/exp:channel_images:images}
    
      {exp:channel_images:images entry_id="{entry_id}"}
       <a href="http://{image:url}%22rel=%22koleksi_foto" rel="koleksi_foto" title="{image:description}">_    {image:url:small}_   </a>
      {/exp:channel_images:images}
    
      {isi_berita_utama}
      
      {if sumber!=no_results}
       <small>Sumber:</small> {sumber}
      {/if}
    
    {/exp:channel:entries}
    </div>
    
    
     {!-- TAMPILAN KATEGORI ARTIKEL --}
     {embed="modules/mod_komentar" loc="home"}
    
    
    </div>{!-- end dari div grid_8 alpha --}
    
    
    <div class="grid_6 omega">
     {embed="modules/kolom_kategori_artikel"}
    </div>
    
    </div>{!-- end dari div container_24 --}
    
    {global_footer}
    {wrapper_close}
    {js}
    {html_close}

    and this is baru/info
    sample: http://autozmart.com/baru/info/C397/5344/toyota_fj_cruiser

    {html_head}
     {exp:seo_lite url_title="{segment_5}"}
    {new_global_stylesheets}
    
    {rss} 
    {favicon}
    {fancybox}
    {html_head_end} 
    <body>
     {heading_begin}
      {embed="new_global_embeds/.top_nav" loc="home"}
     {heading_end}
    {subheader}
    {wrapper_begin}
    
    <div class="container_24">
     
     <div class="grid_16">
      {menu_mobil_bekas}
    
      {exp:ce_cache:escape}
       {embed="modules/mod_mobil_bekas_info"}
      {/exp:ce_cache:escape}
    
      {exp:ce_cache:escape}
       {embed="modules/mod_komentar_produk_merchant"}
      {/exp:ce_cache:escape}
    
     </div>
    
    
     <div class="grid_8 last">
      {embed="banners/index_rolling"}
     </div>
    
    
    </div> {!-- end of container_24--}
    
    {global_footer}
    {wrapper_close}
    {js}
    {html_close}
  • #9 / Apr 03, 2012 6:38am

    Tyas

    35 posts

    This is modules/mod_mobil_bekas_info

    <div class="latar_grey">
    
    <div class="grid_6">
    <div class="latar_grey">
    {exp:channel:entries channel="mobil_{segment_1}_listing" entry_id="{segment_4}" status="open|aktif|premium|sold|Demo Only"}
     {if '{relasi_merchant}' != '0'}
      {related_entries id="relasi_merchant"}
       {if '{logo_merchant}'==''}
        {site_url}themes/site_themes/agile_records/images/online_showroom_no_logo.jpg
       {if:else}
        {logo_merchant}
       {/if}
       <h2><a href="http://{path=merchant/info}/{entry_id}/{url_title}">{title}</a></h2>
    <p>   {categories show_group="14"}<br />
        <a href="http://{path=merchant/direktori}/{category_url_title}">{if {parent_id}!='0'}{category_name}{/if}</a><hr ><br />
       {/categories}</p>
    
    <p>   {if telepon_showroom!=''}Telp : <span class="red">{telepon_showroom}</span><hr >{/if}<br />
       {if fax_showroom!=''}Fax : <span class="red">{fax_showroom}</span><hr >{/if}<br />
       Lokasi : <span class="red">{alamat_showroom} {embed=new_global_embeds/kota_showroom entry_id="{entry_id}"}</span><hr ><br />
      {/related_entries}</p>
    
    <p> {if:elseif '{nama_kontak_pemilik}'!=''}<br />
      {site_url}themes/site_themes/agile_records/images/penjual_perorangan.jpg</p>
    
    <p>  </p><h2>{nama_kontak_pemilik}</h2>
    <p>  Telp : <span class="red">{telpon_pemilik}</span><hr ><br />
      Lokasi: <span class="red">{alamat_pemilik} </p>
    
    <p>  {related_entries id="kotamadya_pemilik"}<br />
                     <a href="http://{path=bekas/kota}/{entry_id}/{url_title}">{title}</a><br />
             {/related_entries}<br />
      </span><br />
     {if:else}<br />
      {site_url}themes/site_themes/agile_records/images/penjual_perorangan.jpg</p>
    
    <p>  </p><h2>{username}</h2>
    <p>  Telpon : <span class="red">{telpon_member}</span><hr ><br />
      Lokasi: <span class="red">{address} {city}</span><br />
     {/if}</p>
    
    <p>{/exp:channel:entries}</p>
    
    <p></div></p>
    
    <p></div></p>
    
    <p><div class="grid_9 omega"><br />
    <div>h1 class="fancy">Data Detail Mobil</div></p>
    
    <p> {exp:channel:entries channel="mobil_{segment_1}_listing" entry_id="{segment_4}" status="open|aktif|premium|sold|Demo Only"}</p>
    
    <p>  <table class="dotted" width="100%"><br />
       {if fitur!=no_results}<br />
       <tr><br />
        <td width="35%">Fitur</td><br />
        <td width="10px">:</td><br />
        <td class="red">{fitur}</td><br />
       </tr><br />
       {/if}<br />
       {if tahun_pembuatan!=no_results}<br />
       <tr><br />
        <td>Tahun Pembuatan</td><br />
        <td>:</td><br />
        <td class="red">{tahun_pembuatan}</td><br />
       </tr><br />
       {/if}</p>
    
    <p>   {if kilometer!=no_results}<br />
       <tr><br />
        <td>Kilometer</td><br />
        <td>:</td><br />
        <td class="red">{kilometer}</td><br />
       </tr><br />
       {/if}</p>
    
    <p>   {if warna_kendaraan!=no_results}<br />
       <tr><br />
        <td>Warna Eksterior</td><br />
        <td>:</td><br />
        <td class="red">{warna_kendaraan}</td><br />
       </tr><br />
       {/if}</p>
    
    <p>   {if warna_interior!=no_results}<br />
       <tr><br />
        <td>Warna Interior</td><br />
        <td>:</td><br />
        <td class="red">{warna_interior}</td><br />
       </tr><br />
       {/if}</p>
    
    <p>   {if harga_mobil_bekas!=no_results}<br />
       <tr><br />
        <td>Harga Jual</td><br />
        <td>:</td><br />
        <td class="red"><strong>{harga_mobil_bekas}</strong> <br />
        {if status_harga!=''}<br />
         ({status_harga})<br />
        {/if}<br />
        </td><br />
       </tr><br />
       {/if}<br />
       {if deskripsi!=no_results}<br />
       <tr><br />
        <td colspan="3" class="red">{deskripsi}</td><br />
       </tr><br />
       {/if}</p>
    
    <p>  </table><br />
    {/exp:channel:entries}</p>
    
    <p></div></p>
    
    <p><hr ></p>
    
    <p>{notifikasi_produk}</p>
    
    <p></div>

    Thanks for you help Dan, need advice since this is my first EE site ;D

  • #10 / Apr 03, 2012 11:22am

    Lisa Wess

    20502 posts

    Periods are permitted in URL titles.  The times that I’ve seen this fail have always come down to .htaccess and mod_rewrite.  I do see you are removing index.php - what method are you using for that?  This is the supported method of removing index.php.

    The best way to check this is to temporarily re-instate index.php and rename .htaccess to something like htaccess.bak while you do that testing.  You should see URL titles with periods work in that case.  That will help to at least isolate the issue.

    Please let us know what you find out!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases