List Info

Thread: Auto-slug not working (or I'm confused)




Auto-slug not working (or I'm confused)
user name
2007-10-12 15:13:36
Hi folks,

I can't seem to get the AUTOGENERATE_SLUG option to work (or
perhaps  
I'm confused as to how it should work). I've enabled it and
restarted  
Bricolage, but I'm still able to import a story, move it to
the  
Publish desk, and publish it (via bric_soap) without a slug
being  
generated. So, stories created and published this way have a
URI of / 
category/yy/mm/dd/ and -- when I import a bunch of stories
-- I  
suspect that this will cause collisions.

This is what I have in my bricolage.conf file:

ALLOW_SLUGLESS_NONFIXED = No
AUTOGENERATE_SLUG       = Yes

Also, when I create new stories via the UI with this option
on,  
there's no difference from having it off, i.e., the slugs
are not  
auto-generated -- instead the UI complains about not having
a slug.

Thoughts?

Phillip.

--
Phillip Smith,
Simplifier of Technology
Community Bandwidth



Re: Auto-slug not working (or I'm confused)
user name
2007-10-12 15:20:00
On Oct 12, 2007, at 13:13, Phillip Smith wrote:

> I can't seem to get the AUTOGENERATE_SLUG option to
work (or  
> perhaps I'm confused as to how it should work). I've
enabled it and  
> restarted Bricolage, but I'm still able to import a
story, move it  
> to the Publish desk, and publish it (via bric_soap)
without a slug  
> being generated. So, stories created and published this
way have a  
> URI of /category/yy/mm/dd/ and -- when I import a bunch
of stories  
> -- I suspect that this will cause collisions.
>
> This is what I have in my bricolage.conf file:
>
> ALLOW_SLUGLESS_NONFIXED = No
> AUTOGENERATE_SLUG       = Yes
>
> Also, when I create new stories via the UI with this
option on,  
> there's no difference from having it off, i.e., the
slugs are not  
> auto-generated -- instead the UI complains about not
having a slug.

Sounds like a bug to me. AUTOGENERATE_SLUG also might not
work with  
SOAP, though of course it should.

Best,

David


Re: Auto-slug not working (or I'm confused)
user name
2007-10-12 15:27:43
Hi Phillip.

I ran into something similar and wound up abandoning
auto-generation. (I 
only ever used the UI, so I can't speak about SOAP.) Here's
how it went:

With this setting:

ALLOW_SLUGLESS_NONFIXED = Yes
AUTOGENERATE_SLUG       = Yes

...Slugs got auto-generated perfectly. (In the UI, you'll
notice that 
the "slug" label in the story create screen is
black, not red.)

But with this:

ALLOW_SLUGLESS_NONFIXED = No
AUTOGENERATE_SLUG       = Yes

The "Slug" label goes red (for required), and the
javascript won't let 
you submit the form without a slug value. Which, if you
provide one, 
doesn't give Bricolage a chance to autogenerate one.

Long story short, I think auto-generation is only an option
if you're 
prepared to allow slugless stories. (And I think you might
want to make 
up your own slugs from the titles in your XML, and them just
SOAP them 
in fully-formed.)

Talk to you soon,

Bret


Phillip Smith wrote:
> 
> Hi folks,
> 
> I can't seem to get the AUTOGENERATE_SLUG option to
work (or perhaps  
> I'm confused as to how it should work). I've enabled it
and restarted  
> Bricolage, but I'm still able to import a story, move
it to the  Publish 
> desk, and publish it (via bric_soap) without a slug
being  generated. 
> So, stories created and published this way have a URI
of / 
> category/yy/mm/dd/ and -- when I import a bunch of
stories -- I  suspect 
> that this will cause collisions.
> 
> This is what I have in my bricolage.conf file:
> 
> ALLOW_SLUGLESS_NONFIXED = No
> AUTOGENERATE_SLUG       = Yes
> 
> Also, when I create new stories via the UI with this
option on,  there's 
> no difference from having it off, i.e., the slugs are
not  
> auto-generated -- instead the UI complains about not
having a slug.
> 
> Thoughts?
> 
> Phillip.
> 
> -- 
> Phillip Smith,
> Simplifier of Technology
> Community Bandwidth
> 
> 
> 
> 


-- 
Bret Dawson
Producer
Pectopah Productions Inc.
(416) 895-7635
bretpectopah.com
www.pectopah.com

Re: Auto-slug not working (or I'm confused)
user name
2007-10-12 18:18:33
On Oct 12, 2007, at 4:27 PM, Bret Dawson wrote:

> With this setting:
>
> ALLOW_SLUGLESS_NONFIXED = Yes
> AUTOGENERATE_SLUG       = Yes
>
> ...Slugs got auto-generated perfectly. (In the UI,
you'll notice  
> that the "slug" label in the story create
screen is black, not red.)


Okay, I've confirmed that this works, but only when creating
*new*  
stories via the UI, doesn't do anything for old stories, or
stories  
created via bric_soap.


> But with this:
>
> ALLOW_SLUGLESS_NONFIXED = No
> AUTOGENERATE_SLUG       = Yes
>
> The "Slug" label goes red (for required), and
the javascript won't  
> let you submit the form without a slug value. Which, if
you provide  
> one, doesn't give Bricolage a chance to autogenerate
one.


Yep. Seems like an odd setting to me. Bug?


> (And I think you might want to make up your own slugs
from the  
> titles in your XML, and them just SOAP them in
fully-formed.)


Hrmph... you're right. That might provide me with more
control of the  
slug.

Phillip.

--
Phillip Smith,
Simplifier of Technology
Community Bandwidth



Re: Auto-slug not working (or I'm confused)
user name
2007-10-12 20:58:07
On Oct 12, 2007, at 16:18, Phillip Smith wrote:

>> ALLOW_SLUGLESS_NONFIXED = Yes
>> AUTOGENERATE_SLUG       = Yes
>>
>> ...Slugs got auto-generated perfectly. (In the UI,
you'll notice  
>> that the "slug" label in the story create
screen is black, not red.)
>
> Okay, I've confirmed that this works, but only when
creating *new*  
> stories via the UI, doesn't do anything for old
stories, or stories  
> created via bric_soap.

I think that it probably should for stories created via
bric_soap,  
but others might disagree. Thoughts?

>> ALLOW_SLUGLESS_NONFIXED = No
>> AUTOGENERATE_SLUG       = Yes
>>
>> The "Slug" label goes red (for required),
and the javascript won't  
>> let you submit the form without a slug value.
Which, if you  
>> provide one, doesn't give Bricolage a chance to
autogenerate one.
>
> Yep. Seems like an odd setting to me. Bug?

Hrm. Yes, I would say so.

>> (And I think you might want to make up your own
slugs from the  
>> titles in your XML, and them just SOAP them in
fully-formed.)
>
> Hrmph... you're right. That might provide me with more
control of  
> the slug.

Right, which is why it's only *arguable* that it's a bug
when using  
the SOAP interface.

Best,

David


Re: Auto-slug not working (or I'm confused)
user name
2007-10-15 14:30:26
On Oct 12, 2007, at 9:58 PM, David E. Wheeler wrote:

>>> ALLOW_SLUGLESS_NONFIXED = No
>>> AUTOGENERATE_SLUG       = Yes
>>>
>>> The "Slug" label goes red (for
required), and the javascript  
>>> won't let you submit the form without a slug
value. Which, if you  
>>> provide one, doesn't give Bricolage a chance to
autogenerate one.
>>
>> Yep. Seems like an odd setting to me. Bug?
>
> Hrm. Yes, I would say so.


http://
bugs.bricolage.cc/show_bug.cgi?id=1306


>>> (And I think you might want to make up your own
slugs from the  
>>> titles in your XML, and them just SOAP them in
fully-formed.)
>>
>> Hrmph... you're right. That might provide me with
more control of  
>> the slug.
>
> Right, which is why it's only *arguable* that it's a
bug when using  
> the SOAP interface.

I agree, I think if I had to choose one or the other, I
would choose  
to set them in the XML documents. Though, having the option
would be  
nice ... also, the option of how to auto-generate the slug
would be  
nice too, e.g., to use the story ID.

Phillip.

--
Phillip Smith,
Simplifier of Technology
Community Bandwidth



[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )