Comments (24)
@georgehrke: your as well - I assume ;-)
from apps.
I've no PostgreSQL installation ATM
from apps.
@eMerzh can you please have a look at the server error log?
Hopefully there is some more information about this database error. THX
from apps.
I'll try to reach the user, but if i see correctly in logs, ...
...
<s:exception>PDOException</s:exception>
<s:message>SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "oc_calendar_objects_pkey"
i've installed a fresh PG and it seems to be fine...
i think it's a migration issue ...
from apps.
AFAIK there were no changes in the database structure - might be a general issue with upgrading on a system using PostgreSQL
from apps.
I tried to change from stable40 to stable45 and i was unable to reproduce the pbm....
i just got the
2012-10-25 17:15:51 UTC DETAIL: parameters: $1 = 'oc_contacts_addressbooks_id_seq'
2012-10-25 17:15:51 UTC ERROR: currval of sequence "oc_contacts_addressbooks_id_seq" is not yet defined in this session
2012-10-25 17:15:51 UTC STATEMENT: SELECT CURRVAL($1)
but after a f5 , everything went well
from apps.
Hi,
I am the user who reported the problem to @eMerzh.
I've read the owncloud's log but I could not found something useful.
When I try to add an event in the calendar through the web interface, I got the error message : "Champs manquants : " and the log is this :
xx.xx.xx.xx - - [25/Oct/2012:19:48:51 +0200] "POST /?app=calendar&getfile=ajax%2Fevent%2Fnew.php HTTP/1.1" 200 980 "https://cloud.fastre.info/?app=calendar" "Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20100101 Firefox/16.0"
The most useful log message is from CalDav-Sync, an android app to synchronize events between owncloud and my phone.
from apps.
Hi,
I had a look on my sql tables.
\d+ oc_calendar_objects
gave me the following infos:
Table "public.oc_calendar_objects"
Column | Type | Modifiers | Storage | Description
--------------+-----------------------------+----------------------------------------+----------+-------------
id | integer | not null default 0 | plain |
calendarid | integer | not null | plain |
objecttype | character varying(40) | not null default ''::character varying | extended |
startdate | timestamp without time zone | default now() | plain |
enddate | timestamp without time zone | default now() | plain |
repeating | integer | | plain |
summary | character varying(255) | | extended |
calendardata | text | | extended |
uri | character varying(255) | | extended |
lastmodified | integer | | plain |
Indexes:
"oc_calendar_objects_pkey" PRIMARY KEY, btree (id)
Has OIDs: no
I was thinking that the id's "default 0" was the problem...
My problem seems to be resolved applying this sql to the database :
alter table oc_calendar_objects alter column id set default nextval('oc_calendar_objects_id_seq');
And now I am able to add new events and to synchronize events.
I will keep you up to date if I see new problems.
from apps.
Ok oups ...i've retested the thing and yes i have the problem too ...
i also have the pbm with contact ... (oc_contacts_cards_id_seq)
so i seems to be a "migration" issue...
from apps.
I got this problem too.
On the web UI, I have the message :
There was an error adding the contact.
The log :
[Thu Oct 25 20:31:14 2012] [error] [client xx.xx.xx.xx] trace: Array\n(\n [0] => Array\n (\n [file] => /srv/www/cloud-4.5.0/apps/contacts/ajax/loghandler.php\n [line] => 26\n [function] => debug\n [args] => Array\n (\n [0] => There was an error adding the contact.\n [1] => 1\n [2] => 3\n )\n\n )\n\n [1] => Array\n (\n [file] => /srv/www/cloud-4.5.0/apps/contacts/ajax/contact/add.php\n [line] => 52\n [function] => bailOut\n [args] => Array\n (\n [0] => There was an error adding the contact.\n )\n\n )\n\n [2] => Array\n (\n [file] => /srv/www/cloud-4.5.0/lib/base.php\n [line] => 472\n [args] => Array\n (\n [0] => /srv/www/cloud-4.5.0/apps/contacts/ajax/contact/add.php\n )\n\n [function] => require_once\n )\n\n [3] => Array\n (\n [file] => /srv/www/cloud-4.5.0/lib/base.php\n [line] => 457\n [function] => loadAppScriptFile\n [class] => OC\n [type] => ::\n [args] => Array\n (\n [0] => contacts\n [1] => ajax/contact/add.php\n )\n\n )\n\n [4] => Array\n (\n [file] => /srv/www/cloud-4.5.0/index.php\n [line] => 28\n [function] => handleRequest\n [class] => OC\n [type] => ::\n [args] => Array\n (\n )\n\n )\n\n)\n, referer: https://cloud.fastre.info/?app=contacts
The database
cloud=# \d+ oc_contacts_cards
Table "public.oc_contacts_cards"
Column | Type | Modifiers | Storage | Description
---------------+------------------------+---------------------------------+----------+-------------
id | integer | not null default 0 | plain |
addressbookid | integer | not null | plain |
fullname | character varying(255) | | extended |
carddata | text | | extended |
uri | character varying(200) | default NULL::character varying | extended |
lastmodified | integer | | plain |
Indexes:
"oc_contacts_cards_pkey" PRIMARY KEY, btree (id)
Has OIDs: no
Do you think we should open a new issue ?
from apps.
Hum...
alter table oc_contacts_cards alter column id set default nextval('oc_contacts_cards_id_seq');
and I do not have any errors any more...
from apps.
May i draw your attention that some tables in my postgresql installation seems not to present a correct default id ?
This is the list where ID is, at my opinion, ok... ("ID ok" on the right)
Schema | Name | Type | Owner
--------+----------------------------------+----------+-------
public | oc_appconfig | table | cloud ID ok
public | oc_atnotes | table | cloud ID ok
public | oc_atnotes_note_id_seq | sequence | cloud
public | oc_bookmarks | table | cloud ID OK
public | oc_bookmarks_id_seq | sequence | cloud
public | oc_bookmarks_tags | table | cloud
public | oc_calendar_calendars | table | cloud
public | oc_calendar_calendars_id_seq | sequence | cloud
public | oc_calendar_objects | table | cloud ID ok
public | oc_calendar_objects_id_seq | sequence | cloud
public | oc_calendar_repeat | table | cloud ID ok
public | oc_calendar_repeat_id_seq | sequence | cloud
public | oc_calendar_share_calendar | table | cloud
public | oc_calendar_share_event | table | cloud
public | oc_contacts_addressbooks | table | cloud
public | oc_contacts_addressbooks_id_seq | sequence | cloud
public | oc_contacts_cards | table | cloud
public | oc_contacts_cards_id_seq | sequence | cloud
public | oc_dlstcharts | table | cloud ID ok
public | oc_dlstcharts_stc_id_seq | sequence | cloud
public | oc_dlstcharts_uconf | table | cloud
public | oc_dlstcharts_uconf_uc_id_seq | sequence | cloud
public | oc_fscache | table | cloud ID ok
public | oc_fscache_id_seq | sequence | cloud
public | oc_gallery_sharing | table | cloud
public | oc_group_admin | table | cloud
public | oc_group_user | table | cloud
public | oc_groups | table | cloud
public | oc_locks | table | cloud
public | oc_locks_id_seq | sequence | cloud
public | oc_log | table | cloud
public | oc_log_id_seq | sequence | cloud
public | oc_media_albums | table | cloud ID ok
public | oc_media_albums_album_id_seq | sequence | cloud
public | oc_media_artists | table | cloud ID ok
public | oc_media_artists_artist_id_seq | sequence | cloud
public | oc_media_sessions | table | cloud ID ok
public | oc_media_sessions_session_id_seq | sequence | cloud
public | oc_media_songs | table | cloud ID ok
public | oc_media_songs_song_id_seq | sequence | cloud
public | oc_media_users | table | cloud
public | oc_pictures_images_cache | table | cloud
public | oc_preferences | table | cloud
public | oc_properties | table | cloud
public | oc_queuedtasks | table | cloud
public | oc_queuedtasks_id_seq | sequence | cloud
public | oc_share | table | cloud ID ok
public | oc_share_id_seq | sequence | cloud
public | oc_sharing | table | cloud
public | oc_users | table | cloud
And with \d+ tablename
function...
cloud=# \d+ oc_bookmarks_tags
Table "public.oc_bookmarks_tags"
Column | Type | Modifiers | Storage | Description
-------------+------------------------+----------------------------------------+----------+-------------
bookmark_id | bigint | default 0 | plain |
tag | character varying(255) | not null default ''::character varying | extended |
Indexes:
"bookmark_tag" UNIQUE CONSTRAINT, btree (bookmark_id, tag)
Has OIDs: no
Table "public.oc_calendar_calendars"
Column | Type | Modifiers | Storage | Description
---------------+------------------------+--------------------+----------+-------------
id | integer | not null default 0 | plain |
userid | character varying(255) | | extended |
displayname | character varying(100) | | extended |
uri | character varying(255) | | extended |
active | integer | not null default 1 | plain |
ctag | integer | not null default 0 | plain |
calendarorder | integer | not null default 0 | plain |
calendarcolor | character varying(10) | | extended |
timezone | text | | extended |
components | character varying(100) | | extended |
Indexes:
"oc_calendar_calendars_pkey" PRIMARY KEY, btree (id)
Has OIDs: no
Table "public.oc_contacts_addressbooks"
Column | Type | Modifiers | Storage | Description
-------------+------------------------+----------------------------------------+----------+-------------
id | integer | not null default 0 | plain |
userid | character varying(255) | not null default ''::character varying | extended |
displayname | character varying(255) | | extended |
uri | character varying(200) | default NULL::character varying | extended |
description | character varying(255) | default NULL::character varying | extended |
ctag | integer | not null default 1 | plain |
active | integer | not null default 1 | plain |
Indexes:
"oc_contacts_addressbooks_pkey" PRIMARY KEY, btree (id)
Has OIDs: no
Table "public.oc_locks"
Column | Type | Modifiers | Storage | Description
---------+------------------------+---------------------------------+----------+-------------
id | integer | not null default 0 | plain |
userid | character varying(64) | default NULL::character varying | extended |
owner | character varying(100) | | extended |
timeout | integer | default 0 | plain |
created | bigint | default 0 | plain |
token | character varying(100) | | extended |
scope | smallint | default 0 | plain |
depth | smallint | default 0 | plain |
uri | text | | extended |
Indexes:
"oc_locks_pkey" PRIMARY KEY, btree (id)
Has OIDs: no
Table "public.oc_log"
Column | Type | Modifiers | Storage | Description
--------+-----------------------------+----------------------------------------+----------+-------------
id | integer | not null default 0 | plain |
moment | timestamp without time zone | not null default now() | plain |
appid | character varying(255) | not null default ''::character varying | extended |
user | character varying(255) | not null default ''::character varying | extended |
action | character varying(255) | not null default ''::character varying | extended |
info | text | not null | extended |
Indexes:
"oc_log_pkey" PRIMARY KEY, btree (id)
Has OIDs: no
Table "public.oc_queuedtasks"
Column | Type | Modifiers | Storage | Description
------------+------------------------+------------------------------------------+----------+-------------
id | integer | not null default 0 | plain |
app | character varying(255) | not null default NULL::character varying | extended |
klass | character varying(255) | not null default NULL::character varying | extended |
method | character varying(255) | not null default NULL::character varying | extended |
parameters | character varying(255) | not null default NULL::character varying | extended |
Indexes:
"oc_queuedtasks_pkey" PRIMARY KEY, btree (id)
Has OIDs: no
from apps.
During the migration process, i got ...
2012-10-25 19:19:59 UTC LOG: duration: 73.272 ms statement: ALTER TABLE "oc_contacts_cards" ALTER "id" TYPE INTEGER USING CAST("id" AS INTEGER)
2012-10-25 19:19:59 UTC LOG: duration: 0.923 ms statement: ALTER TABLE "oc_contacts_cards" ALTER "id" SET DEFAULT 0
2012-10-25 19:19:59 UTC LOG: duration: 0.123 ms statement: ALTER TABLE "oc_contacts_cards" ALTER "id" SET NOT NULL
i dig to see how to avoid that
from apps.
Ok guys i think i finally nailed it! 👻 (those icons are really kitsch :p )
damn'
it's a bug in MDB2 schema of course ;) ... there is no bugs in OC ... kof kof ...
here is my patch ...
https://gist.github.com/3955908
tomorrow i'll try to submit it to MDB2 schema.... with with the current activity i fear that there will be no movements :s
from apps.
\o/ How did you get that particular icon? I only found I could trigger some writing a colon ':'
from apps.
i just hit ':' then g ....
i think i found a list here http://www.emoji-cheat-sheet.com/
what do you think about 🚢' ing the patch and seeing how it goes with MDB2... because more people will experience migration issues in a near future ..
from apps.
I want to get rid of MDB2 so bad :(
This isn't exactly the first postgres bug in MDB2 schema that needed to be fixed for oC
from apps.
@eMerzh imo we should until we eventually can ditch MDB2. As long as the one who patches a 3rd party module reports it upstream - and even with patches as you did - and remembers to patch again if the module gets updated, it's the best solution.
from apps.
I can't even see what what shipit emoticon is supposed to be? :-P
from apps.
@tanghus ok then i'll commit it this evening into stable4.5 and master...
the bug is reported upstream since this morning :) ...
from apps.
Patch deployed , and should be release with next stables versions (branch 4, 4.5 and 5)..
unfortunately @julienfastre i don't think it fill fix you install before the next update... so you'll have put your id default value by yourself .
from apps.
Ok, thanks @eMerzh : i am going to add new default id manually.
Do you think applying the patch in the future may cause any problem in the case the 'default id" are fixed ?
from apps.
No no @julienfastre ,
my patch only make sure that if you have an autoincremented field it won't be removed by a migration...
so it prevent the problem to happend the next time :)
from apps.
Hi,
Here are the few sql lines who helped me solve this problem. I think those must be applied after updating from owncloud 4.0 to 4.5.0 (and not to 4.5.1, as I understand) on instances running with a postgresql database
BEGIN;
alter table oc_contacts_cards alter column id set default nextval('oc_contacts_cards_id_seq');
alter table oc_calendar_objects alter column id set default nextval('oc_calendar_objects_id_seq');
alter table oc_calendar_calendars alter column id set default nextval('oc_calendar_calendars_id_seq');
alter table oc_contacts_addressbooks alter column id set default nextval('oc_contacts_addressbooks_id_seq');
alter table oc_locks alter column id set default nextval('oc_locks_id_seq');
alter table oc_log alter column id set default nextval('oc_log_id_seq');
alter table oc_queuedtasks alter column id set default nextval('oc_queuedtasks_id_seq');
COMMIT;
from apps.
Related Issues (20)
- External storage, google drive broken *update* Readme if not connecting. HOT 2
- Segate Personal Storage Cloud (arm7) update fault HOT 1
- the OS X calendar caldav connection to owncloud 9.1.1 is broken. HOT 1
- Move bundled apps to separate repo HOT 1
- Delete files_videoviewer since files_videoplayer is not bundled? HOT 3
- Login failed despite correct credentials HOT 6
- Access class methods of other apps HOT 2
- Bad UX creating a tag in the admin/additonal menu HOT 1
- External Sites public, viewable on shared folders HOT 2
- Stop using private OC_Group class
- user_external with imap: too many connections to the server HOT 7
- calendar app Certificate has been revoked HOT 1
- saml HOT 1
- Zyxel Owncloud deletes files after uninstalling !!! HOT 2
- [user_external] imap: username and [email protected] are treated as different users HOT 2
- owncloud folder erased if you run device maintenance HOT 1
- [external]: using custom icons makes ownCloud not available after upgrading to 10.0.3 HOT 7
- user_external: disabling logins with '@' does not work any more
- Move user_external and external to separate repos HOT 8
- Stop using $CLASSPATH
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apps.