sNews Forum

Previous sNews versions => sNews 1.7 RC => Issues and bugs for RC version => Topic started by: mosh on May 16, 2008, 05:59:19 pm

Title: change page to article bug ?
Post by: mosh on May 16, 2008, 05:59:19 pm
hey all  :D

error 1:
while try to change article status from page to article,
after click on edit, i get error TitleExists.
but no other title or sef with that name exists, only one  ;D

error 2:
still on pages editor, i untick publish article, opartion ok, but page still published.
the setting for unpublish was saved, but no effect.

please confirm  :P

awesome day
Title: Re: change page to article bug ?
Post by: funlw65 on May 16, 2008, 07:37:13 pm
Error

The Title already exists.
Be careful: Due to the fact that when something goes wrong most posting options are lost, please check them before posting again.

In fact, when you edit something, that thing MUST exist because you don`t add something new.... logical error.

- when you add something unique, no other thing with same title/seftitle must be there
- when you edit/delete something, that thing must exist.

---------------------------------------------
1.confirmed :P
2.confirmed - you can`t unpublish a published page....

Philmoz said:
Quote
There are a few other little niggly things...
see if you can spot them...

Hopefully you won't find any 'new' ones..
Is a new one?
Title: Re: change page to article bug ?
Post by: philmoz on May 16, 2008, 09:03:15 pm
'fraid so.
Thx for that.

[edit]
I'm not having any issue with
article <<==>> extra
page <<==>> extra
article ==>> page
just
page ==>> article

Is that a consistent result?

[EDIT 2]
unpublish page.
function pages()
query should be
Quote
$query = 'SELECT id,seftitle,title FROM '._PRE.'articles WHERE position = 3 AND published = 1  ORDER BY id';
Title: Re: change page to article bug ?
Post by: philmoz on May 16, 2008, 10:33:03 pm
Error

The Title already exists.
Be careful: Due to the fact that when something goes wrong most posting options are lost, please check them before posting again.

In fact, when you edit something, that thing MUST exist because you don`t add something new.... logical error.

- when you add something unique, no other thing with same title/seftitle must be there
- when you edit/delete something, that thing must exist.

yeees, and maybe no...

1.7 allows non-unique title/seftitle due to the subcat structure.
As was argued during compilation, if someone was using snews for a sport type site, say a club site where there are various grades of play... and each grade was a category, and in each was a statistics article, then each article would need to be called Statistics.
URLs would be say
[site]/senior/statistics/ 
[site]/a-grade/statistics/
[site]/b-grade/statistics/
So, the restriction is that no identical title/seftitle may be placed in the same category or same subcategory.
I think this is what may be failing in an obscure way.

Also, noticed that changing from center to extra and back again, we lose the category setting, which makes sense to a point, but would help explain why that conversion is not falling over.
Title: Re: change page to article bug ?
Post by: philmoz on May 16, 2008, 11:12:03 pm
Error

The Title already exists.
Be careful: Due to the fact that when something goes wrong most posting options are lost, please check them before posting again.

In fact, when you edit something, that thing MUST exist because you don`t add something new.... logical error.

- when you add something unique, no other thing with same title/seftitle must be there
- when you edit/delete something, that thing must exist.

yeees, and maybe no...

1.7 allows non-unique title/seftitle due to the subcat structure.
As was argued during compilation, if someone was using snews for a sport type site, say a club site where there are various grades of play... and each grade was a category, and in each was a statistics article, then each article would need to be called Statistics.
URLs would be say
[site]/senior/statistics/ 
[site]/a-grade/statistics/
[site]/b-grade/statistics/
So, the restriction is that no identical title/seftitle may be placed in the same category or same subcategory.
I think this is what may be failing in an obscure way.

Also, noticed that changing from center to extra and back again, we lose the category setting, which makes sense to a point, but would help explain why that conversion is not falling over.
Title: Re: change page to article bug ?
Post by: funlw65 on May 16, 2008, 11:55:14 pm

just
page ==>> article


Well, maybe this must be not allowed.... otherwise, you need a combo with a category (then is a must for a page to be a member of a category)....
This way, you will have pages and subpages :P (switching only position (type))... but alot of new code...
Title: Re: change page to article bug ?
Post by: funlw65 on May 16, 2008, 11:59:52 pm
Quote
Also, noticed that changing from center to extra and back again, we lose the category setting, which makes sense to a point, but would help explain why that conversion is not falling over.

Correct, maybe we need these rules:

pages <==> extra
article ==> pages
article ==> extra

Title: Re: change page to article bug ?
Post by: philmoz on May 17, 2008, 03:42:10 am
function processing()
in the first else statement, locate $category, and alter to
Code: [Select]
$category = isset($_POST['define_category'])?$_POST['define_category']:0;
and try that :D .. hopefully will behave
Title: Re: change page to article bug ?
Post by: funlw65 on May 17, 2008, 04:15:07 am
Problems!
1.Created new page (comments off).Published
2.Edited and changed to Center. Operation successful.
3.Wanted to view from admin articles. Error:
   Requested contents could not be found. Please go back or use the search feature.
 - The page is no more in menu and the article with that name can`t be seen in Uncategorized or anywhere. Can be seen in article list from admin but the view link point to sitename/articlename, not to sitename/uncategorized/articlename
4.Edit link is working, so edited. Status: Category is Uncategorized in combo; Show on home page is off; Published Now is checked. Everything seems ok. So, I pressed edit button and magic, article appeared in Uncategorized category. Is happening with every page converted to article... After successful conversion, I must edit again to appear in Uncategorized....

EDIT:
5.When I set back an article to page (article is from a previous page, in Uncategorized) it appears in admin list of pages but also displayed as member of Uncategorized. So, view link is pointing to sitename/uncategorized/pagename. But in menu bar is pointing to sitename/pagename and both links are functional.
6.When I edit again this page, everything is ok (in admin list of pages does not appear as a member category again).
Title: Re: change page to article bug ?
Post by: philmoz on May 17, 2008, 04:53:42 am
After successful conversion, I must edit again to appear in Uncategorized....
correct.
Pages shouldn't (currently) have a category, sort of like extras.
So when converting from pages to center (article) the category should not be present, which means that it is a second edit to assign category. This is to be expected.

However, I'm still having issues, even with the change above... it started playing up again after I converted page to article, assigned category, then converted back to page, then back to article...
(I'm a tad off the wall today... why anyone would do the above is byond me, but still)

so, the following seems to be working...
in same place in processing()
Code: [Select]
$category = $_POST['position']==3 &&$_POST['define_category']>0?0:$_POST['define_category'];
then in case 'admin_article':
both the lines that start like
case($position==1 &&
need to have the start altered to
case($position==1 && $category>0 &&

This will bypass the check_if_unique routine, making category 0 a safe repository for converted pages.


As for viewing an article in this category, this needs to be looked at.
Title: Re: change page to article bug ?
Post by: funlw65 on May 17, 2008, 05:04:01 am
Converting a (new) page to article, the same issues as described.
Converting an article to page, is working, no more issues described.
Title: Re: change page to article bug ?
Post by: philmoz on May 17, 2008, 05:14:30 am
looking at disabling the view link in admin for articles with category = 0
It would act as a signal that it needs to be edited... yes???
Title: Re: change page to article bug ?
Post by: funlw65 on May 17, 2008, 05:20:34 am
Quote
correct.
Pages shouldn't (currently) have a category, sort of like extras.
So when converting from pages to center (article) the category should not be present, which means that it is a second edit to assign category. This is to be expected.

Hmm, two steps for conversion... not good. I am already in edit mode in first step....
We must see Uncategorized as `buffer` category, a temp. category. Where we have only accidentally articles. So no possibility to have two articles with same name. Why not assigned Uncategorized from first step... because a page is loosing in first step a page status. Is article from first step. And when you create an article have Uncategorized by default. No way to argue ;D (joke)
Title: Re: change page to article bug ?
Post by: philmoz on May 17, 2008, 05:28:12 am
yes, and no.
The uncategorised category can be altered to be anything the user wants it to be.
It is in fact the default for any new article, and as such may already have an article with same sef and title, which should be stopped.
In admin, there is no way to set the category to zero, so only converted items will use this, and since those items were not allocated full categories (extras display on categories, bt they are handled differently)

Note: an extra converted to center article will also require a second edit.
Title: Re: change page to article bug ?
Post by: funlw65 on May 17, 2008, 05:39:50 am
:P....
I can work faster in one step, and with an local editor as `buffer`, moving content of page in a new article...A page have a short name because of space but an article can have a longer title...


yes, and no.
The uncategorised category can be altered to be anything the user wants it to be.
It is in fact the default for any new article, and as such may already have an article with same sef and title, which should be stopped.
So, is what I said in first phrase... sooner or later you will have to rename the page....So, does not matter if Uncategorized is used currently...
Title: Re: change page to article bug ?
Post by: funlw65 on May 17, 2008, 05:46:31 am
In my opinion, Uncategorized category must be read only. Can`t be editable, sortable....You prevent problems this way with newbies....
I have the liberty to create any category I want, I`m not limited to a exact number so, no need to alter Uncategorized... And if I don`t want to appear, I must organize better articles....
Something must be read-only (position or Name, or both)....
Title: Re: change page to article bug ?
Post by: Armen on May 17, 2008, 08:35:39 am
sNews is not for noobs.

That's why one is responsible for his/her actions. If one wants to delete a category - nothing will stop him/her.

Although, you can make sNews uderstand category = "-1" expression to distinguish "Uncategorized" articles from all other articles, for example.

Hm. That's a good idea,
Title: Re: change page to article bug ?
Post by: funlw65 on May 17, 2008, 04:48:32 pm
Why not assigned Uncategorized from first step...

No good having only this... because you need second step to assign wanted category....
In page/extra edit mode, you must have the posibility to choose a category...Which cat., does count only when position==center. Only in edit mode...

In processing, when a page/extras have assigned a position==center, then, if not choosed a category, then category=Uncategorized, else, use assigned category.

For that combo, not need to remember an old setting, is here just for helping me to set a category destination when send page or extra to an article.
Title: Re: change page to article bug ?
Post by: mosh on May 17, 2008, 06:02:56 pm
after some more tests:
if i change the Page status to extra works ok, then it let me change it to article ( center ).

one more issue i think we have is:
after editting, the back link leads to no results, should take us to page or to admin ?

 :P

awesome day
Title: Re: change page to article bug ?
Post by: philmoz on May 17, 2008, 10:51:37 pm
ok, so... how about when converting page ==> article, in the article admin, the 'view' link not shown, but a message letting you know the category is to be set.

Also, maybe resetting  extra category(=0) if changed to article.
Title: Re: change page to article bug ?
Post by: funlw65 on May 18, 2008, 12:15:51 am
:) Let room for mods...
Ok, I think is ok if view is disabled... but, telling that you must assign a category when a combo can be put in page edit mod....
Well, this entire thing with moving content form a zone to another.... I can live without it... But if this thing is a major request then, you know, can be made it complete...

But is ok with view disabled...
Title: Re: change page to article bug ?
Post by: mosh on May 18, 2008, 09:13:57 am
hey  :D

IMHO,

Divid to 3 Content Type:

1) Static pages
3) Article (center)  pages
2) Extras pages

No Option To Change One Content Type To Anther Content Type.  :o ;D

awesome day  8)
Title: Re: change page to article bug ?
Post by: philmoz on May 18, 2008, 09:29:14 am
No Option To Change One Content Type To Anther Content Type.  :o ;D
That would save a lot of grief, but if we did that, there'd be a group wanting to be able to do just that  :P

Looking at extra==>article, there is a few items that are not set anyway, eg infoline, comments, so ex-extra should be edited after conversion anyway.
Title: Re: change page to article bug ?
Post by: codetwist on May 18, 2008, 04:24:04 pm
Would be interesting to know what for that group is using this bug ... errr ... 'feature'. Apart from 'correction' of sloppy initial site setup because of anti-RTM mentality of course.
Title: Re: change page to article bug ?
Post by: mosh on May 18, 2008, 08:15:39 pm
 ::)

i use joomla from time to time,
no option to transform static pages <===> article pages.
each has its own use.

we will gain less code and as philmoz said
Quote
That would save a lot of grief

and if there will be group who want this option,
let them speak now or forever shush hehe  :P

awesome day 2 all
Title: Re: change page to article bug ?
Post by: centered on May 20, 2008, 12:51:14 am
Code: [Select]
$category = isset($_POST['define_category'])?$_POST['define_category']:0;
This should be a 1, since the 0 category, home, is no longer present.

Though articles/pages => extra works, it does not work for me since extraid is not being identified

possible fix:
Code: [Select]
//  $category = $_POST['define_category'];
$category = isset($_POST['define_category'])?$_POST['define_category']:1;
  $subcat = $_POST['subcat'];
  $page = $_POST['define_page'];
//  $def_extra = $_POST['define_extra'];
$def_extra = isset($_POST['define_extra'])?$_POST['define_extra']:1;

problem being if category 1 gets deleted.... which may bring back an argument that category 1 should be editable but not deletable....
Title: Re: change page to article bug ?
Post by: philmoz on May 20, 2008, 09:57:29 am
Code: [Select]
$category = isset($_POST['define_category'])?$_POST['define_category']:0;This should be a 1, since the 0 category, home, is no longer present.
Category 0 is no longer present as an editable, or named category.
This means that it works real nice as a repository for dysfunctional 'articles', which require editing for them to become world readable.
It is also outside the scope of seftitle/title testing, so won't automatically throw an error.
Title: Re: change page to article bug ?
Post by: centered on May 20, 2008, 11:59:27 am
Soooo your saying we need to have a 0 category? I am not understanding your suggestion.  A secondary editing would be redundant as a users intention would want to take care of everything in one action, that being said perhaps a show/hide function may be neccessary?

Once a "article" is published it can be edited to become a article/page/extra. 
If a user selects article, the category dropdown should appear.
If a user selects extra, and groups are visible, then show the group dropdown, and other options should appear/disappear
Title: Re: change page to article bug ?
Post by: Rui Mendes on May 20, 2008, 03:15:31 pm
I try fix with some code, not ready yet. Some are working, please give more 2 days.

When I change page to articles, one combobox must appear (be visible) to choose category.
Title: Re: change page to article bug ?
Post by: philmoz on May 20, 2008, 09:10:36 pm
Pages don't have, by default, a category.
Extras don't use infoline or comments.

Changing either of these to an article results in items that require setting. None of these items is required to be displayed in the admin area when it is surplus to requirement of pages or extras.
Title: Re: change page to article bug ?
Post by: funlw65 on May 20, 2008, 10:32:10 pm
When you create a new page, not need of combo with categories. But in edit mode, if you want to send page to articles band, you need to set destination. No other things need it. Only a combo with categories. A page don`t need cats. but you must point the destination.... in one single step.

Is possible that someone want to send a page with a good story to articles, to make room for another page, but, I don`t see the need for moving extras...

I see extras like widgets...

---------------------------
Anyway, this moving thing is a bad from SEO point of view.
You know, I had my site with SEF off.... and all pages indexed... and I decided to make SEF on, like all snoozers...
Bad move. With the new sitemap sent to google, only one page is indexed.... :P. Of course this will change in time, but the mistake was already made....
Guys, don`t do the same....
Title: Re: change page to article bug ?
Post by: funlw65 on May 20, 2008, 10:42:18 pm

Extras don't use infoline or comments.


I think is a good idea to have these options enable/disable site wide, not only from article...
Title: Re: change page to article bug ?
Post by: Rui Mendes on May 23, 2008, 03:02:04 pm
Hello my friends.

Sorry I've no time to finish/fix this bug right now.

I was invited to work in television "TV Shows" making "Cue sheets", I must rewrite the delphi code and new database (my last database has 217.500 records).

I think I must give up my actual work (metal structures), and get another job to working at home like webdesigner or something like that.

 :D
Title: Re: change page to article bug ?
Post by: funlw65 on May 23, 2008, 03:32:13 pm
Congratulations Rui,
Good luck with Cue sheets. I like Delphy, but I work with freepascal.
Working at home is the best job if cover your family needs.