Ticket #383 (reopened Bug report)

Opened 10 years ago

Last modified 9 years ago

Not able to save new content entries

Reported by: anti_mail@… Owned by:
Priority: normal Milestone: WifiDog Auth Server 1.0
Component: Auth server, Authentication, permissions and access control Version:
Keywords: Cc: benoitg

Description

hi! i installed the auth server, and it seems to run. but when i try to add content and push the "save .." button, it reloads the page and nothing seems to be saved. klicking around ends sometimes up with:

" execSqlUpdate() : Die folgende Datenbankabfrage verlief fehlerhaft : UPDATE network_has_content SET display_page= WHERE network_id='default-network' AND content_id = '5c53c29863e22dd7bf2f5ecf576dd835'; UPDATE network_has_content SET display_area= WHERE network_id='default-network' AND content_id = '5c53c29863e22dd7bf2f5ecf576dd835'; UPDATE network_has_content SET display_order= WHERE network_id='default-network' AND content_id = '5c53c29863e22dd7bf2f5ecf576dd835';

Fehlermeldung : ERROR: insert or update on table "network_has_content" violates foreign key constraint "display_location_fkey" DETAIL: Key (display_page)=() is not present in table "content_available_display_pages".

Backtrace:

#0 /srv/www/htdocs/wifidog/classes/Content.php(823): AbstractDb?->execSqlUpdate() #1 /srv/www/htdocs/wifidog/classes/Network.php(1699): Content::processLinkedContentUI() #2 /srv/www/htdocs/wifidog/admin/generic_object_admin.php(174): Network->processAdminUI() "

i got the svn version of wifidog from today and the depencies are ok. i reinstalled the sql schema without changes. i got postresql version 8.1.5 and php version 5.2.

Change History

Changed 10 years ago by benoitg

  • priority changed from blocker to normal
  • milestone changed from WifiDog Auth Server 2.0 to WifiDog Auth Server 1.0

From the error above, it seems you are trying to add content from the Network administration page, but didn't select a display page. That's very strange, can you actually see the different see the different display pages in the "Display page" select box when you add the content?

If not, there may have been a problem when you inserted the initial data.

If you can, I am stumped, I don't see why the display page wouldn't get displayed.

Changed 10 years ago by anti_mail@…

hmm. i deleted the database and run install.php again. after redirecting to the portal page it starts following:



execSqlUpdate(): Datenbankabfrage :

BEGIN;
INSERT INTO permissions (permission_id, stakeholder_type_id) VALUES ('NETWORK_PERM_VIEW_ONLINE_USERS', 'Network');
INSERT INTO role_has_permissions (role_id, permission_id) (SELECT role_id, 'NETWORK_PERM_VIEW_ONLINE_USERS' FROM roles WHERE stakeholder_type_id='Network');
INSERT INTO permissions (permission_id, stakeholder_type_id) VALUES ('NETWORK_PERM_EDIT_ANY_USER', 'Network');
INSERT INTO role_has_permissions (role_id, permission_id) (SELECT role_id, 'NETWORK_PERM_EDIT_ANY_USER' FROM roles WHERE stakeholder_type_id='Network');
INSERT INTO permissions (permission_id, stakeholder_type_id) VALUES ('NETWORK_PERM_EDIT_NETWORK_CONFIG', 'Network');
INSERT INTO role_has_permissions (role_id, permission_id) (SELECT role_id, 'NETWORK_PERM_EDIT_NETWORK_CONFIG' FROM roles WHERE stakeholder_type_id='Network');
INSERT INTO permissions (permission_id, stakeholder_type_id) VALUES ('NETWORK_PERM_VIEW_STATISTICS', 'Network');
INSERT INTO role_has_permissions (role_id, permission_id) (SELECT role_id, 'NETWORK_PERM_VIEW_STATISTICS' FROM roles WHERE stakeholder_type_id='Network');
INSERT INTO permissions (permission_id, stakeholder_type_id) VALUES ('NETWORK_PERM_EDIT_ANY_NODE_CONFIG', 'Network');
INSERT INTO role_has_permissions (role_id, permission_id) (SELECT role_id, 'NETWORK_PERM_EDIT_ANY_NODE_CONFIG' FROM roles WHERE stakeholder_type_id='Network');
INSERT INTO permissions (permission_id, stakeholder_type_id) VALUES ('SERVER_PERM_EDIT_ROLES', 'Server');
INSERT INTO role_has_permissions (role_id, permission_id) (SELECT role_id, 'SERVER_PERM_EDIT_ROLES' FROM roles WHERE stakeholder_type_id='Server');
INSERT INTO permissions (permission_id, stakeholder_type_id) VALUES ('SERVER_PERM_EDIT_ANY_VIRTUAL_HOST', 'Server');
INSERT INTO role_has_permissions (role_id, permission_id) (SELECT role_id, 'SERVER_PERM_EDIT_ANY_VIRTUAL_HOST' FROM roles WHERE stakeholder_type_id='Server');
INSERT INTO permissions (permission_id, stakeholder_type_id) VALUES ('SERVER_PERM_EDIT_SERVER_CONFIG', 'Server');
INSERT INTO role_has_permissions (role_id, permission_id) (SELECT role_id, 'SERVER_PERM_EDIT_SERVER_CONFIG' FROM roles WHERE stakeholder_type_id='Server');
INSERT INTO permissions (permission_id, stakeholder_type_id) VALUES ('SERVER_PERM_EDIT_PROFILE_TEMPLATES', 'Server');
INSERT INTO role_has_permissions (role_id, permission_id) (SELECT role_id, 'SERVER_PERM_EDIT_PROFILE_TEMPLATES' FROM roles WHERE stakeholder_type_id='Server');
INSERT INTO permissions (permission_id, stakeholder_type_id) VALUES ('SERVER_PERM_EDIT_CONTENT_TYPE_FILTERS', 'Server');
INSERT INTO role_has_permissions (role_id, permission_id) (SELECT role_id, 'SERVER_PERM_EDIT_CONTENT_TYPE_FILTERS' FROM roles WHERE stakeholder_type_id='Server');
INSERT INTO permissions (permission_id, stakeholder_type_id) VALUES ('SERVER_PERM_EDIT_CONTENT_LIBRARY', 'Server');
INSERT INTO role_has_permissions (role_id, permission_id) (SELECT role_id, 'SERVER_PERM_EDIT_CONTENT_LIBRARY' FROM roles WHERE stakeholder_type_id='Server');
INSERT INTO permissions (permission_id, stakeholder_type_id) VALUES ('NODE_PERM_EDIT_GATEWAY_ID', 'Node');
INSERT INTO permissions (permission_id, stakeholder_type_id) VALUES ('NODE_PERM_EDIT_CONFIG', 'Node');
COMMIT;

Die Datenbankabfrage verarbeitete 0 Objekte.
Dauer der Datenbankabfrage: 0,020817 Sekunde(n)

execSqlUpdate(): Die Datenbankabfrage verarbeitete 0 Objekte.

but the last sentence means in english: the database query querys 0 (zero) objects

i think that might be a fault?

Changed 10 years ago by benoitg

  • cc benoitg added

No, that's all normal. It's the dynamic permission system syncing. Did you check if the display page select box was displayed with the different pages?

Changed 10 years ago by anonymous

yes, every drop down box is filled with values.

Changed 10 years ago by anonymous

ok, the sql query error doesnt seem to pop up again, but i am not able to save new items. a new item is created, but adding text to it fails. its always empty.

Changed 10 years ago by benoitg

You mean when you click edit on the content you just added (which I presume is a Langstring), type text in, and save, the text isn't saved?

I have to go, you should probably try to catch me on IRC, this back and forth is getting time-consuming.

Changed 10 years ago by anonymous

yes, you get it. the text inserted will not be saved, staying "Empty TrivialLangstring?". however, inserting a file or an image works.

perhaps a database fault, may the database schema be faulty?

Changed 10 years ago by anonymous

hello again.

well i spent the whole day with setting up a new database server, a new webserver and a new wifidog install, but it wont let me save text into "trivial langstring" .. please! tell me your configuration, i will replay it. i just need that f* hotspot to be running, my boss begins to think im an stupid idiot.. :-(

i just cant figure out where to search the fault.. everything seems to look fine.

if youre interested, you can login at  http://anti43.dyndns.org/ with user: "admin" and pw: " " (space)

Changed 10 years ago by benoitg

Changed 10 years ago by anti_mail@…

hi again.. i installed the database server on a windows machine in my network, newest version. no changes :-( so the database is not the problem. on my linux machine ive installed every php5 extension i could find...  http://anti43.dyndns.org/ is still there but not at night (i think we got a little time-shift). please tell me your configuration of your webserver, so that i can rebuild it.

thank you very much

Changed 10 years ago by benoitg

I looked on your site, there are several problems in addition to the content not saved problem above. Some look like circular dependency problems, and may, or may not be wifidog bugs. Are you sure you have "display_errors = On" as outlined in  https://dev.wifidog.org/wiki/Contact%20/%20Support.

Once again, the tracker is NOT the right way to get fast and good support. Please try to get help on IRC or on the mailing list.

I'll still answer your question, though I doubt it will help you: I run Ubuntu gusty for development. Among other, I help maintain production servers, one of which is running Debian 4.0 (etch).

Changed 10 years ago by anonymous

as you mentioned in irc, i reinstalled from svn.

now there are errors like this:

Notice: Undefined index: get_new_content_node_3e52b24108d02b66f115a39ea85bd013_content_new_future_id in /srv/www/htdocs/classes/Content.php on line 649 Notice: Undefined index: get_new_uicontent_type in /srv/www/htdocs/classes/FormSelectGenerator.php on line 260

and

Notice: Undefined index: langstrings_0befa8bba0c642697e21cb3b3124c23d_substring_89b69730e079d65f0ce10f15dcf0423f_language in /srv/www/htdocs/classes/FormSelectGenerator.php on line 260 Notice: Undefined index: langstrings_0befa8bba0c642697e21cb3b3124c23d_substring_89b69730e079d65f0ce10f15dcf0423f_string in /srv/www/htdocs/classes/Content/Langstring/Langstring.php on line 444 Notice: Undefined index: langstrings_0befa8bba0c642697e21cb3b3124c23d_substring_f2c950e3f2ebf092e4f6d987ae679eac_language in /srv/www/htdocs/classes/FormSelectGenerator.php on line 260 Notice: Undefined index: langstrings_0befa8bba0c642697e21cb3b3124c23d_substring_f2c950e3f2ebf092e4f6d987ae679eac_string in /srv/www/htdocs/classes/Content/Langstring/Langstring.php on line 444

Changed 10 years ago by benoitg

I guess you never caught me on IRC or the mailing list. Does the error still occur?

Changed 10 years ago by benoitg

  • status changed from new to closed
  • resolution set to worksforme

No reply from reporter

Changed 9 years ago by info@…

  • status changed from closed to reopened
  • resolution worksforme deleted

Dear All,

I reopen this subject as I get the same problem after trying to save a modified Network Content OR a modified Node Content - I've just added a TrivialLnagString? and push [SaveNetwork?] or [Save Node]:

" execSqlUpdate() : An error occured while executing the following SQL query : UPDATE network_has_content SET display_page= WHERE network_id='default-network' AND content_id = 'af985fbaf4270491030f990db42171a1'; UPDATE network_has_content SET display_area= WHERE network_id='default-network' AND content_id = 'af985fbaf4270491030f990db42171a1'; UPDATE network_has_content SET display_order= WHERE network_id='default-network' AND content_id = 'af985fbaf4270491030f990db42171a1';

Error message : ERREUR: une instruction insert ou update sur la table « network_has_content » viole la contrainte de clé étrangère « display_location_fkey » DETAIL: La clé (display_page)=() n'est pas présente dans la table « content_available_display_pages ».

Backtrace:

#0 /srv/www/arandes/wifidog-auth/wifidog/classes/Content.php(823): AbstractDb?->execSqlUpdate() #1 /srv/www/arandes/wifidog-auth/wifidog/classes/Network.php(1816): Content::processLinkedContentUI() #2 /srv/www/arandes/wifidog-auth/wifidog/admin/generic_object_admin.php(174): Network->processAdminUI()

"

Note: See TracTickets for help on using tickets.