Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Duplicate Article Error  (Read 4831 times)

anver

  • Newbie
  • *
  • Karma: 0
  • Posts: 18
Duplicate Article Error
« on: November 22, 2007, 04:13:48 pm »

Hi All,


I think this is a serious bug in snews 1.6. To reproduce the bug. Log on to admin and add an article.

Step 1.
For example add an article with title  "sample article" without quotes. Type your article content. Add it to the achievements ( I created one already ) category. Now click submit to add the article to the database.

Step 2.
Now add another article with the same title "sample article", the SEF is automatically generated which is also same. Type in the article content.Add it to the same category achievements. Click submit to add the article to the database. Now this error pops up.

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.

step 3.

Now change the title "sample article" to "sample article2" and the SEF to sample-article2.
Add the article to the same category called achievements. click submit.
Now it shows "Operation Successfully Completed"


bug1.
You will not be able to see any new articles with the title "sample article2" in the achievements category.

bug2.
you will not be able add another article with the title "sample article2".




Logged

brauck

  • Hero Member
  • *****
  • Karma: 18
  • Posts: 556
    • http://www.hbw-webdesign.nl/
Re: Duplicate Article Error
« Reply #1 on: November 23, 2007, 10:09:16 am »

Yeah, I think you’re quite righ here anver, this looks like a bug.

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

And that is exactly what happens, both the position and the publish field are set to zero, but … we cannot alter them.

The article form doesn’t display the publish checkbox after the exercise you described and we can’t modify the ‘position’field by hand in this state of the process.

On first site I think the function form_articles needs some alterations to preserve the initial values of the position- and publish field.

We have to look in to this.

Well observed anver. Thanks  ;)
Logged
Confidence is reduced complexity.
brauck.nl for free css templates

codetwist

  • Hero Member
  • *****
  • Karma: 50
  • Posts: 940
Re: Duplicate Article Error
« Reply #2 on: November 23, 2007, 11:34:43 am »

Doesn't that patch help a little in this case as well?
Logged

brauck

  • Hero Member
  • *****
  • Karma: 18
  • Posts: 556
    • http://www.hbw-webdesign.nl/
Re: Duplicate Article Error
« Reply #3 on: November 23, 2007, 03:58:24 pm »

Sjeez, missed that one completely codie, feel stupid  :P
will look into it. thanks   ;)
Logged
Confidence is reduced complexity.
brauck.nl for free css templates

anver

  • Newbie
  • *
  • Karma: 0
  • Posts: 18
Re: Duplicate Article Error
« Reply #4 on: November 24, 2007, 09:25:35 am »

Doesn't that patch help a little in this case as well?

Hi Codetwist,

The patch is not working as well.

thanks,
Logged

codetwist

  • Hero Member
  • *****
  • Karma: 50
  • Posts: 940
Re: Duplicate Article Error
« Reply #5 on: November 24, 2007, 12:59:30 pm »

Ok. Then there is one more reason to fix both bugs permanently IMHO.
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: Duplicate Article Error
« Reply #6 on: November 26, 2007, 06:16:10 pm »

Ok, just retested that patch on an an modified snews.

The first part operates enough to 'unhide' the article in the 'unpublished' state. The article will need to be reedited to place it in the desired category and to make published.
« Last Edit: November 26, 2007, 06:23:29 pm by philmoz »
Logged
Of all the things I have lost, it is my mind that I miss the most.

anver

  • Newbie
  • *
  • Karma: 0
  • Posts: 18
Re: Duplicate Article Error
« Reply #7 on: November 27, 2007, 02:48:34 pm »

Ok, just retested that patch on an an modified unmodified snews.

The first part operates enough to 'unhide' the article in the 'unpublished' state. The article will need to be reedited to place it in the desired category and to make published.

The articles are appearing in the unpublished state only after logging out of the admin and re-logging. I dont think this is a proper solution. Sorry for asking this what is a modified snews Philmoz ?
« Last Edit: November 28, 2007, 07:28:01 am by philmoz »
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
Re: Duplicate Article Error
« Reply #8 on: November 27, 2007, 03:22:35 pm »

I think Philmoz meant to say he tested it on an un-modified sNews install... one that has no other modifications.  :)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: Duplicate Article Error
« Reply #9 on: November 28, 2007, 07:26:56 am »

um, yep, unmodified.
... and no, I haven't had to log out either, just refresh the admin panel, and the article will now be present.
Logged
Of all the things I have lost, it is my mind that I miss the most.

anver

  • Newbie
  • *
  • Karma: 0
  • Posts: 18
Re: Duplicate Article Error
« Reply #10 on: November 28, 2007, 05:28:43 pm »

If i am correct i see one more bug, if not please excuse me.

Bug reproduction How to:

Note: This is after applying the patch posted by codetwist. See the previous post from codetwist.

1. Log on to admin
2. add new article.
3. add another article with the same title and Sef title
4. The error pops up.
"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."

This is ok. An error must occur at this point and is displayed. But see carefully below you will miss something. The publish article option and the display date option. Why is this happening when the user do have the option to rename the article title and sef title ?  I consider this as a bug but i dont know if it exists for some other reason.
Secondly all other options are still there, so when I rename the article title and the Sef title and add the article to a category, why should that new RENAMED article go to an unpublished state ?  Why don't the user have the option to make the article published right away ?.

Philmoz was correct that refreshing the admin is enough to view the unpublished article but please do consider the above problems serious and find some permanent solution asap.

Thanks.
 
« Last Edit: November 29, 2007, 05:10:58 pm by anver »
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: Duplicate Article Error
« Reply #11 on: December 07, 2007, 09:43:56 pm »

@anver, you are correct.
What is not happening, on error, is the return of submitted field data to the page (except content).

But then the 'patch' is not a full fix, only a means to allow the content to be 'found' (because it is saved to db) and therefore allow corrections to be made to other posting options.

As I stated in the patch post:
Quote
Multiple re-edits will rectify, and prevent the need to  delve into the db with phpmyadmin.
(not satisfactory, but the article will not 'disappear into the ether')
Logged
Of all the things I have lost, it is my mind that I miss the most.

Vivvo

  • Newbie
  • *
  • Karma: 0
  • Posts: 20
Re: Duplicate Article Error
« Reply #12 on: December 21, 2007, 06:34:04 am »

Mm, I've also had this a couple of times. But I thought it was because I was posting the same article again on my site that was alreay there with the same title. I thought it was a feature to stop you creating a duplicate article.
Logged

Joost

  • Guest
Re: Duplicate Article Error
« Reply #13 on: December 21, 2007, 07:34:47 am »

Both is true. There is a feature that prevents posting an article with a title that's already in the database. However, there is a bug that shows almost the same symptoms.
Logged

Rui Mendes

  • Development,Testing, Support
  • Hero Member
  • *****
  • Karma: 195
  • Posts: 1009
  • sNews1.7
    • Comunidade Portuguesa
Re: Duplicate Article Error
« Reply #14 on: December 27, 2007, 11:03:48 am »

I'm not in my dev machine, but can you try this Patch. I think this one will solve your/our problem
Logged
Need a Job on Europe. Linkdin - Facebook / Group