urlTItle not searchable or accessable

Skip to first unread message

Ryan Norman

Mar 24, 2023, 12:42:26 PMMar 24
to dotCMS User Group
I'll post here again with an issue I'm having. Hopefully someone will interact with this board again.

I have a content type that I created that I'm hoping to use with a detail page. The content type for now just contains Host (contentHost), Name (name), and URL Title (urlTitle).

If I create content using that type Name will show up and will be searchable however, even if I have the option checked, URL Title will not. Opening the content entry for editing shows that the vtl for the custom URL Title field is populating that field correctly (example: entering John Doe in Name yields john-doe in the url title field). However a look at the content in the content search window shows a blank url title field. A search for john-doe in Advanced returns nothing.

The detail page that I have set up returns 404 for some thing like [mydomain]/profiles/john-doe despite, as far as I can tell, having set up the detail page correctly.

I have tried several things to troubleshoot including adding a Hosts field to the content type, reindexing everything more than once, shutting down my server and restarting it, setting the fallthrough flag to false... I even thought maybe that one piece of content was corrupt so I added a second entry and that is behaving exactly the same.

I could really use some help here. It would be very much appreciated! I'm happy to post screenshots or logs or anything if it would help.

Will Ezell

Mar 24, 2023, 1:08:01 PMMar 24
to dot...@googlegroups.com
Custom fields are really just a hidden form field on the content editing screen plus whatever code you have in them for display.  You need to make sure that the vtl you are using is actually setting the value of the hidden form field - from the sound of it, It seems like something is wrong there.  Check your javascript console and see if there is a javascript error where it is trying to set the value.

http://dotcms.com - Open Source Java Content Management
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/bfe2cc01-f54f-4826-a353-0a61911b3606n%40googlegroups.com.


382 NE 191st St #92150
Miami, Florida 33179-3899
305-900-2001 | Direct: 978.294.9429

Ryan Norman

Mar 24, 2023, 2:00:39 PMMar 24
to dotCMS User Group
Your reply prompted me to check something. Turns out it was a case issue.

I changed this line in the vtl:

dojo.byId("urlTitle").value=urltitle; -- where the 't' in 'urltitle' needs to be uppercase (at least in my instance).

Republished the content and it's working fine now.
Reply all
Reply to author
0 new messages