Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: users

stories not publishing to current primary_uri when changing slugs

 

 

Bricolage users RSS feed   Index | Next | Previous | View Threaded


acaul at rand

Mar 10, 2009, 2:19 PM

Post #1 of 4 (1040 views)
Permalink
stories not publishing to current primary_uri when changing slugs

I am repairing a story that was created with a space in its slug
(which had resulted in a space in the file name).

1.) When I correct the slug, save-and-stay, and then check-in-and-
publish, the old file does not get deleted and then replaced by the
new file name.

2.) I changed the slug back to have a space in it and then added an
expire date. When I check-in-and_publish, it removes the spaced file
name from the server.

3.) I checked the story back out, re-corrected the slug (to have no
space), removed the expire date. When I check-in-and-publish, it
publishes to the server, but outputs the file with the old file name,
i.e. the file name with the space in it.

4.) I looked through Postgres.
story and story_instance have the uri/slug with no space.
story_uri has a uri with no space
resource has a uri and path with a space. the value in the mod_time
field is the original create date of the story.

There were some other stories with the space-in-the-slug problem.
Some of those were repaired without issue. In resource, those have an
entry with the space in the uri and path fields and a mod_time from
the create date. These ALSO have a record with the corrected (no
space) uri and path and a mod_time of right now. This suggests that
something is interfering with the corrected information being written
to the 'resource' table. I am tempted to insert a record by hand, but
I thought would ask the list for advice first. Thanks.

EXAMPLE:

story 1234
slug: caul ashlee
primary_uri: /people/caul ashlee.html
file: /var/www/people/caul ashlee.html

psql=> select id, path, uri, mod_time from resource where uri like '%
caul%' order by mod_time;

id |
path
| uri | mod_time
-------
+-----------------------------------------------------------------------
----------------+--------------------------------
+---------------------------
5055 | /usr/local/bricolage/data/burn/stage/oc_1026/people/caul
ashlee.html | /people/caul ashlee.html | 2007-09-04 17:16:25
(1 row)



After I correct the slug and check-in-and-publish

story 1234
slug: caul_ashlee
primary_uri: /people/caul_ashlee.html
file (does not correct): /var/www/people/caul ashlee.html

psql=> select id, path, uri, mod_time from resource where uri like '%
caul%' order by mod_time;
(Also does not correct.)

id |
path
| uri | mod_time
-------
+-----------------------------------------------------------------------
----------------+--------------------------------
+---------------------------
5055 | /usr/local/bricolage/data/burn/stage/oc_1026/people/caul
ashlee.html | /people/caul ashlee.html | 2007-09-04 17:16:25
(1 row)


For other stories in which I made the same correction to the slug
(let's say changed <slug>wheeler david</slug> to <slug>wheeler_david</
slug>), the query to the resource table returns this

id |
path
| uri | mod_time
-------
+-----------------------------------------------------------------------
--------------------+------------------------------------
+---------------------------
5082 | /usr/local/bricolage/data/burn/stage/oc_1026/people/wheeler
david.html | /people/wheeler david.html | 2008-06-12 09:54:19
7391 | /usr/local/bricolage/data/burn/stage/oc_1026/people/
wheeler_david.html | /people/wheeler_david.html | 2009-03-10 16:46:32
(2 rows)



Thanks!

__________________________________________________________________________

This email message is for the sole use of the intended recipient(s) and
may contain confidential information. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message.


david at kineticode

Mar 10, 2009, 7:08 PM

Post #2 of 4 (958 views)
Permalink
Re: stories not publishing to current primary_uri when changing slugs [In reply to]

On Mar 10, 2009, at 2:19 PM, Ashlee Caul wrote:

> I am repairing a story that was created with a space in its slug
> (which had resulted in a space in the file name).
>
> 1.) When I correct the slug, save-and-stay, and then check-in-and-
> publish, the old file does not get deleted and then replaced by the
> new file name.
>
> 2.) I changed the slug back to have a space in it and then added an
> expire date. When I check-in-and_publish, it removes the spaced file
> name from the server.
>
> 3.) I checked the story back out, re-corrected the slug (to have no
> space), removed the expire date. When I check-in-and-publish, it
> publishes to the server, but outputs the file with the old file
> name, i.e. the file name with the space in it.
>
> 4.) I looked through Postgres.
> story and story_instance have the uri/slug with no space.
> story_uri has a uri with no space
> resource has a uri and path with a space. the value in the mod_time
> field is the original create date of the story.
>
> There were some other stories with the space-in-the-slug problem.
> Some of those were repaired without issue. In resource, those have
> an entry with the space in the uri and path fields and a mod_time
> from the create date. These ALSO have a record with the corrected
> (no space) uri and path and a mod_time of right now. This suggests
> that something is interfering with the corrected information being
> written to the 'resource' table. I am tempted to insert a record by
> hand, but I thought would ask the list for advice first. Thanks.

Okay, this is likely because of the use of an underscore and how
resources are looked up using SQL's LIKE operator, for which _ is a
wildcard character. Please file a bug report for this, against
rev_1_10, so that I remember to try to fix it.

In the meantime, I think that if you delete the resource records with
the spaces in them, all will be well. Otherwise, change the slug to
have a dash instead of an underscore. Or, if you want the underscore,
change it to a double dot, publish it, then change it to an underscore.

HTH,

David


acaul at rand

Mar 11, 2009, 1:14 PM

Post #3 of 4 (939 views)
Permalink
Re: stories not publishing to current primary_uri when changing slugs [In reply to]

>> I am repairing a story that was created with a space in its slug
>> (which had resulted in a space in the file name).
>>
>> 1.) When I correct the slug, save-and-stay, and then check-in-and-
>> publish, the old file does not get deleted and then replaced by
>> the new file name.
>>
>> 2.) I changed the slug back to have a space in it and then added
>> an expire date. When I check-in-and_publish, it removes the spaced
>> file name from the server.
>>
>> 3.) I checked the story back out, re-corrected the slug (to have
>> no space), removed the expire date. When I check-in-and-publish,
>> it publishes to the server, but outputs the file with the old file
>> name, i.e. the file name with the space in it.
>>
>> 4.) I looked through Postgres.
>> story and story_instance have the uri/slug with no space.
>> story_uri has a uri with no space
>> resource has a uri and path with a space. the value in the
>> mod_time field is the original create date of the story.
>>
>> There were some other stories with the space-in-the-slug problem.
>> Some of those were repaired without issue. In resource, those have
>> an entry with the space in the uri and path fields and a mod_time
>> from the create date. These ALSO have a record with the corrected
>> (no space) uri and path and a mod_time of right now. This suggests
>> that something is interfering with the corrected information being
>> written to the 'resource' table. I am tempted to insert a record
>> by hand, but I thought would ask the list for advice first. Thanks.
>
> Okay, this is likely because of the use of an underscore and how
> resources are looked up using SQL's LIKE operator, for which _ is a
> wildcard character. Please file a bug report for this, against
> rev_1_10, so that I remember to try to fix it.
>
> In the meantime, I think that if you delete the resource records
> with the spaces in them, all will be well. Otherwise, change the
> slug to have a dash instead of an underscore. Or, if you want the
> underscore, change it to a double dot, publish it, then change it
> to an underscore.

We tried this last suggestion. Using the double dots worked and
output a new file. However, when we switched that back to an
underscore, we got this error on Publish:

Too many Bric::Dist::Resource objects found.
[/usr/local/bricolage/lib/Bric/Dist/Resource.pm:263]
[/usr/local/bricolage/lib/Bric/Util/Burner.pm:2054]
[/usr/local/bricolage/lib/Bric/Util/Burner/Mason.pm:598]
[/usr/local/bricolage/lib/Bric/Util/Burner/Mason.pm:297]
[/usr/local/bricolage/lib/Bric/Util/Burner.pm:1499]
[/usr/local/bricolage/lib/Bric/Util/Burner.pm:1276]
[/usr/local/bricolage/lib/Bric/Util/Job/Pub.pm:191]
[/usr/local/bricolage/lib/Bric/Util/Job.pm:1889]
[/usr/local/bricolage/bin/bric_queued:244]
[/usr/local/bricolage/bin/bric_queued:213]




__________________________________________________________________________

This email message is for the sole use of the intended recipient(s) and
may contain confidential information. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message.


david at kineticode

Mar 11, 2009, 1:31 PM

Post #4 of 4 (951 views)
Permalink
Re: stories not publishing to current primary_uri when changing slugs [In reply to]

On Mar 11, 2009, at 1:14 PM, Ashlee Caul wrote:

> We tried this last suggestion. Using the double dots worked and
> output a new file. However, when we switched that back to an
> underscore, we got this error on Publish:
>
> Too many Bric::Dist::Resource objects found.
> [/usr/local/bricolage/lib/Bric/Dist/Resource.pm:263]
> [/usr/local/bricolage/lib/Bric/Util/Burner.pm:2054]
> [/usr/local/bricolage/lib/Bric/Util/Burner/Mason.pm:598]
> [/usr/local/bricolage/lib/Bric/Util/Burner/Mason.pm:297]
> [/usr/local/bricolage/lib/Bric/Util/Burner.pm:1499]
> [/usr/local/bricolage/lib/Bric/Util/Burner.pm:1276]
> [/usr/local/bricolage/lib/Bric/Util/Job/Pub.pm:191]
> [/usr/local/bricolage/lib/Bric/Util/Job.pm:1889]
> [/usr/local/bricolage/bin/bric_queued:244]
> [/usr/local/bricolage/bin/bric_queued:213]

Just delete all the resources for that story.

Best,

David

Bricolage users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.