I don't know why I keep getting this error when trying to create a related content view and a blog archive view (based on per user ie when I go to my blog I just want to see my archives and not all user blogs).
Related content guide here: http://www.metachunk.com/blog/adding-related-content-view-drupal-7
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'blogarchives' for key 'name': INSERT INTO {views_view} (name, description, tag, base_table, human_name, core) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5); Array ( [:db_insert_placeholder_0] => blogarchives [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => default [:db_insert_placeholder_3] => node [:db_insert_placeholder_4] => Blog Arrchives [:db_insert_placeholder_5] => 7 ) in views_db_object->save_row() (line 1830 of (edited for privacy).../public_html/modules/views/includes/view.inc).
This is kinda driving me loopy. I have deleted, recreated and tried over and over again. Have been deleting my caches but I just don't know what is going on.
I can't understand the duplicate entry as it is the only entry with that name.
I am a complete noob to Drupal and Drupal 7 but am so far loving the flexibility of this CMS compared to using Wordpress and Postnuke/phpbb boards in the past.
I eagerly look forward to hearing from someone on this as I'm not going to be able to sleep now till it is fixed lol.
Comments
Comment #1
dawehnerBefore adding tags read the issue tag guidelines. Do NOT use tags for adding random keywords or duplicating the "Assigned" or "Component" fields. Separate terms with a comma, not a space.
Can you have a look at the database and see whether there is a somehow broken entry in {views_view} table?
Comment #3
kiwipearls CreditAttribution: kiwipearls commentedHi sorry for tagging wrong, it won't happen again.
Thank-you for your reply
I don't know how to check for broken entries?
All the views I have created are in Views_Views - my showcase and latest blogs and guild recruitments views all work fine and are displayed in the table.
My new view Blogarchives is there and that wasn't working - but the data is the same as in the creation view page.
I deleted my related content view yesterday so that is not appearing in the views_view table.
I will try recreating that view first this morning and see what happens.
Could it have been a delay in Drupal emptying this table's data in SQL - which is why I received the error? As the related content was working correctly earlier in the day, but I went into views to remove the paging - as I did not want the paging arrows to show in the block. And that is when things started to go funny.
Comment #4
giupenni CreditAttribution: giupenni commentedI have the same problem when I create a View
Comment #5
kiwipearls CreditAttribution: kiwipearls commentedI think I know what is happening, but do not understand it fully.
I recreated my Related Content block, saved it. Then I changed the pager settings, saved it again. And got the PD0Exception error duplicate content.
From this, I feel/think it is trying to create a new entry instead of saving to the existing entry?
So I deleted it and recreated it again and this time, I set everything up - all the pager settings, contextual filters etc without hitting the save button until I knew I had followed the steps in the Related content guide.
And it saved properly this time with no exception error.
As you can see on this page: http://senilityguild.com/content/hyperspace-beacon-human-high-culture-pa...
So I hope this helps someone understand what is going on, so it can be fixed somehow.
Comment #6
merlinofchaos CreditAttribution: merlinofchaos commentedAre you able to provide a set of exact steps for reproduce the problem, preferably with the latest 7.x-3.x-dev and latest 7.x-1.x CTools? I've never seen anything like this on my dev sites, so it seems like it's something weird going on. Like perhaps form caching somehow caching a version of the view that isn't in the database so that it thinks it is new.
Comment #7
merlinofchaos CreditAttribution: merlinofchaos commentedComment #8
TrevorBradley CreditAttribution: TrevorBradley commentedI hit this too today. I think I created a corrupted view (too many items? 0 items? Displaying teasers?) in some way and tried to edit it. I deleted the view and started over again and all was well.
Comment #9
netsensei CreditAttribution: netsensei commentedI hit a similar problem today.
Using Views 7.x-3.0-beta3 and CTools 7.x-1.0-alpha4 (it's an older project with SPARQL Views - though that shouldn't pose a problem)
1. I created a new view
2. Set the name
3. Choose "block display" (instead of "page display")
4. Hit "Save and exit"
5. In the views overview: hit the "edit" button next to the new view
6. Without doing anything hit the "save" button
Endresult: funnyness ensues
When I use the "save and continue" option, then save the view from the views editor, it saves the view nicely. Editing it from steps 5 through 6 above works like a peach.
Comment #10
esmerel CreditAttribution: esmerel commentedComment #11
dawehnerOkay there is also another issue #1123198: Error message when modifying filter criteria/saving View
Comment #12
davidstagg CreditAttribution: davidstagg commentedI don't know how much it will help, but I ran into this issue in Drupal 7 as well. Two things helped fix it:
Hope this helped.
Comment #13
merlinofchaos CreditAttribution: merlinofchaos commentedPlease don't change issue statuses without reading the descriptions of the status values.
Please don't re-open a duplicate issue without carefully explaining why it is not a duplicate.