Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3

Author Topic: change page to article bug ?  (Read 14458 times)

mosh

  • Hero Member
  • *****
  • Karma: 77
  • Posts: 510
  • Awesome day :)
    • cms-zen
change page to article bug ?
« 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
« Last Edit: May 16, 2008, 06:15:35 PM by mosh »
Logged

funlw65

  • Hero Member
  • *****
  • Karma: 96
  • Posts: 771
    • Country Lab
Re: change page to article bug ?
« Reply #1 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?
« Last Edit: May 16, 2008, 08:03:58 PM by funlw65 »
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: change page to article bug ?
« Reply #2 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';
« Last Edit: May 16, 2008, 10:12:10 PM by philmoz »
Logged
Of all the things I have lost, it is my mind that I miss the most.

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: change page to article bug ?
« Reply #3 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.
Logged
Of all the things I have lost, it is my mind that I miss the most.

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: change page to article bug ?
« Reply #4 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.
Logged
Of all the things I have lost, it is my mind that I miss the most.

funlw65

  • Hero Member
  • *****
  • Karma: 96
  • Posts: 771
    • Country Lab
Re: change page to article bug ?
« Reply #5 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...
Logged

funlw65

  • Hero Member
  • *****
  • Karma: 96
  • Posts: 771
    • Country Lab
Re: change page to article bug ?
« Reply #6 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

Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: change page to article bug ?
« Reply #7 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
Logged
Of all the things I have lost, it is my mind that I miss the most.

funlw65

  • Hero Member
  • *****
  • Karma: 96
  • Posts: 771
    • Country Lab
Re: change page to article bug ?
« Reply #8 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).
« Last Edit: May 17, 2008, 04:56:36 AM by funlw65 »
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: change page to article bug ?
« Reply #9 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.
« Last Edit: May 17, 2008, 04:59:03 AM by philmoz »
Logged
Of all the things I have lost, it is my mind that I miss the most.

funlw65

  • Hero Member
  • *****
  • Karma: 96
  • Posts: 771
    • Country Lab
Re: change page to article bug ?
« Reply #10 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.
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: change page to article bug ?
« Reply #11 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???
Logged
Of all the things I have lost, it is my mind that I miss the most.

funlw65

  • Hero Member
  • *****
  • Karma: 96
  • Posts: 771
    • Country Lab
Re: change page to article bug ?
« Reply #12 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)
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: change page to article bug ?
« Reply #13 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.
Logged
Of all the things I have lost, it is my mind that I miss the most.

funlw65

  • Hero Member
  • *****
  • Karma: 96
  • Posts: 771
    • Country Lab
Re: change page to article bug ?
« Reply #14 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...
Logged
Pages: [1] 2 3