Keyword

Start/Finish Publishing Not Working

  • Zandergraphics
  • Zandergraphics's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 3 weeks ago #87827 by Zandergraphics
Start/Finish Publishing Not Working was created by Zandergraphics
i am developing a site where there will be a News section that needs to use the start/finish publishing fields (actually it will hopefully autoarchive when it is done), however, when I went to test the autoarchive plugin functions (third party plugin) it did not archive the article. So I turned the autoarchive plugin off and tried again... the article didn't unpublish at the specified time (I double-checked the server time by creating a new article and noting the time filled in there to make sure that was't the issue). So, I thought maybe there was something wrong with the installation or something... so I tested it on three other sites that use K2... same results.
Am I missing something somewhere?? I've tried to search for answers but can't find anything. Am I the only person who is having this problem? Could it be a server issue(but it's only in K2, not core articles)?? I'm stumped at the moment, but if I can't get this to work I'm going to have to go back to using Joomla core rather than K2 (unpublish works in the core articles). Anyone have any ideas??

Please Log in or Create an account to join the conversation.

More
14 years 3 weeks ago #87828 by william white
Replied by william white on topic Start/Finish Publishing Not Working
Please post a link to the autoarchive you are using

Please Log in or Create an account to join the conversation.

  • Zandergraphics
  • Zandergraphics's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 3 weeks ago #87829 by Zandergraphics
Replied by Zandergraphics on topic Start/Finish Publishing Not Working
William White said:Please post a link to the autoarchive you are using


Here is a link to the plugin page: keepjoomla.com/bovitmenyek/k2-autoarchiver.html

However, even when this is disabled, I still can't get the start or finish publishing fields to work in K2 and, in fact, I have tried on sites that don't have that plugin installed at all. It's strange....

Please Log in or Create an account to join the conversation.

More
14 years 3 weeks ago #87830 by David R.
Replied by David R. on topic Start/Finish Publishing Not Working
If you can, turn on the joomla debugging and take a look at the SQL being generated. If there's no reference to the date fields in question, this might indicate a problem with K2. If there is a date range being generated, then this might help you debug what is going wrong. K2 items go into the table jos_k2_items, so that's what you want to look for in the debug.

Kyle Gonyea said:William White said:Please post a link to the autoarchive you are using


Here is a link to the plugin page: keepjoomla.com/bovitmenyek/k2-autoarchiver.html

However, even when this is disabled, I still can't get the start or finish publishing fields to work in K2 and, in fact, I have tried on sites that don't have that plugin installed at all. It's strange....

Please Log in or Create an account to join the conversation.

  • Zandergraphics
  • Zandergraphics's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 3 weeks ago #87831 by Zandergraphics
Replied by Zandergraphics on topic Start/Finish Publishing Not Working
Okay... new perspective now... it seems that the article is being unpublished in the front end, however, if I look at the Item List in K2, it still shows it as published. If I turn the autoarchive plugin back on the article is unpublished in the front end view, not in the back, and is not moved to the specified category.

Please Log in or Create an account to join the conversation.

More
14 years 3 weeks ago #87832 by David R.
Replied by David R. on topic Start/Finish Publishing Not Working
Do you have any form of caching turned on? I don't really understand what you mean by unpublished in the front/backend. There's a "published" status in the k2 item, and that drives things. If you are seeing things that are "unpublished" but still showing up, that could either be because the data is cached, or the queries are wrong, but somehow I have to assume that the queries work, because I've unpublished items and they disappear as expected.

Kyle Gonyea said:Okay... new perspective now... it seems that the article is being unpublished in the front end, however, if I look at the Item List in K2, it still shows it as published. If I turn the autoarchive plugin back on the article is unpublished in the front end view, not in the back, and is not moved to the specified category.

Please Log in or Create an account to join the conversation.

  • Zandergraphics
  • Zandergraphics's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 3 weeks ago #87833 by Zandergraphics
Replied by Zandergraphics on topic Start/Finish Publishing Not Working
From what I can see, when you change the Finish or Start Publishing date in the K2 back end, it changes the publish_up or publish_down entry in SQL. Then the K2 view calls a query that filters out results based on the date range such as:

SELECT *
FROM jos_k2_items
WHERE id != 110
AND catid=34
AND ordering > 6
AND published=1
AND ( publish_up = '0000-00-00 00:00:00' OR publish_up <= '2010-08-30 06:25:15' )
AND ( publish_down = '0000-00-00 00:00:00' OR publish_down >= '2010-08-30 06:25:15' )
AND access<=0
AND trash=0
ORDER BY ordering ASC
LIMIT 0, 1
SELECT *
FROM jos_k2_items
WHERE id != 110
AND catid=34
AND ordering < 6
AND published=1
AND ( publish_up = '0000-00-00 00:00:00' OR publish_up <= '2010-08-30 06:25:15' )
AND ( publish_down = '0000-00-00 00:00:00' OR publish_down >= '2010-08-30 06:25:15' )
AND access<=0
AND trash=0
ORDER BY ordering DESC
LIMIT 0, 1

(though looking at that, that may not be the right query, but I think the idea must be the same because the published value is still 1 in SQL)

and so the article does not show in the front end, however, the published value in SQL is not changed from 1 to 0 and therefore it still shows as being published (because technically it is still published, just filtered out by date query).

So I guess my question then becomes, is there a way to make K2 run a query when the publish_down date is reached that will mark the item as not published (and maybe other queries to change category too, but let's just look at the published field for now).... or is K2 supposed to be changing the published value to zero and something is wrong?

Please Log in or Create an account to join the conversation.

More
14 years 3 weeks ago #87834 by David R.
Replied by David R. on topic Start/Finish Publishing Not Working
Kyle,
I may be missing the point here, but the queries are exactly what i would expect.

If either (the article is out of publish date range) OR the article is not published it doesn't show in the frontend. What else would you expect it to do? You could easily write a sql query to go and find articles that are past the article publish date, and change the published column to 0, if that's what you mean. Such a query could even be put in as a cron job (if your server is *nix) although truthfully I don't see why this would be important to do, but if it's really bothering you, you might put in a feature request to add the publish_up, publish_down dates into the item admin list. Then they could be sorted by those dates in the admin by clicking on the column heading.

The query would be something like: UPDATE jos_k2_items set published = 0 where published = 1 AND
publish_down > '0000-00-00 00:00:00' AND publish_down < NOW();

Kyle Gonyea said:From what I can see, when you change the Finish or Start Publishing date in the K2 back end, it changes the publish_up or publish_down entry in SQL. Then the K2 view calls a query that filters out results based on the date range such as:
SELECT *
FROM jos_k2_items
WHERE id != 110
AND catid=34
AND ordering > 6
AND published=1
AND ( publish_up = '0000-00-00 00:00:00' OR publish_up <= '2010-08-30 06:25:15' )
AND ( publish_down = '0000-00-00 00:00:00' OR publish_down >= '2010-08-30 06:25:15' )
AND access<=0
AND trash=0
ORDER BY ordering ASC
LIMIT 0, 1
SELECT *
FROM jos_k2_items
WHERE id != 110
AND catid=34
AND ordering < 6
AND published=1
AND ( publish_up = '0000-00-00 00:00:00' OR publish_up <= '2010-08-30 06:25:15' )
AND ( publish_down = '0000-00-00 00:00:00' OR publish_down >= '2010-08-30 06:25:15' )
AND access<=0
AND trash=0
ORDER BY ordering DESC
LIMIT 0, 1

and so the article does not show in the front end, however, the published value in SQL is not changed from 1 to 0 and therefore it still shows as being published (because technically it is still published, just filtered out by date query).

So I guess my question then becomes, is there a way to make K2 run a query when the publish_down date is reached that will mark the item as not published (and maybe other queries to change category too, but let's just look at the published field for now).... or is K2 supposed to be changing the published value to zero and something is wrong?

Please Log in or Create an account to join the conversation.

  • Zandergraphics
  • Zandergraphics's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 3 weeks ago #87835 by Zandergraphics
Replied by Zandergraphics on topic Start/Finish Publishing Not Working
I guess the point is that it seems to be a disadvantage that there isn't a way to tell if an article is published or not without checking through the entire category on the front end to make sure it isn't there. In core Joomla, when an article is unpublished through the Finish Publishing feature, you can see that it is not published by looking through the Article Manager in the back end and, in fact, even has a distinct icon associated with it. In K2, the articles all still show as published with a green checkmark and the Admin has no way to know what articles are actually showing on the site.

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #87836 by stavroch
Replied by stavroch on topic Start/Finish Publishing Not Working
Tha above link of plugin doesn't work.

Kyle have you find any solution of showing the expired items (finish date<=current date) at the back end?

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum