Forums | Mahara Community

Support /
Unable to delete pages - nonrecoverable error


Chris K's profile picture
Posts: 3

01 August 2023, 1:33

Hello,
I have recently been assigned to the system administration tasks for our Mahara server.
One of our users is trying to delete a page but is unable.  They get a generic error page when they try to delete the page.  I get the same error when impersonating the user and trying to delete it.
They were able to delete other pages for a while but i think they are totally stuck now.

We are running Mahara 19.04.0 on Linux.  Database is MySQL.

The error message is in the attached screenshot

Here is the whole stack trace (i replaced my IP and the server hostname.  I had to remove the URL to post this with my newly created account):

[Thu Jul 27 11:48:28.285427 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651] [WAR] d3 (lib/adodb/adodb-exceptions.inc.php:45) Array to string conversion, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.285554 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651] Call stack (most recent first):, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.285615 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * log_message(string(size 26), integer, true, true, string(size 61), integer) at /opt/app/apache2439/htdocs/lib/errors.php:520, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.285672 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * error(integer, string(size 26), string(size 61), integer, array(size 7)) at /opt/app/apache2439/htdocs/lib/adodb/adodb-exceptions.inc.php:45, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.285727 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * ADODB_Exception->__construct(string(size 9), string(size 11), integer, string(size 190), string(size 35), array(size 1), object(ADODB_postgres8)) at /opt/app/apache2439/htdocs/lib/adodb/adodb-exceptions.inc.php:80, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.285783 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * adodb_throw(string(size 9), string(size 11), integer, string(size 190), string(size 35), array(size 1), object(ADODB_postgres8)) at /opt/app/apache2439/htdocs/lib/adodb/adodb.inc.php:310, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.285859 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * ADODB_TransMonitor(string(size 9), string(size 11), integer, string(size 190), string(size 35), array(size 1), object(ADODB_postgres8)) at /opt/app/apache2439/htdocs/lib/adodb/adodb.inc.php:1281, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.285922 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * ADOConnection->_Execute(string(size 35), array(size 1)) at /opt/app/apache2439/htdocs/lib/adodb/adodb.inc.php:1241, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.285966 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * ADOConnection->Execute(string(size 35), array(size 1)) at /opt/app/apache2439/htdocs/lib/dml.php:981, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.286012 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * delete_records(string(size 4), string(size 2), string(size 4)) at /opt/app/apache2439/htdocs/lib/view.php:1020, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.286056 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * View->delete() at /opt/app/apache2439/htdocs/view/delete.php:124, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.286104 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * deleteview_submit(object(Pieform), array(size 2)) at /opt/app/apache2439/htdocs/lib/pieforms/pieform.php:544, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.286166 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * Pieform->__construct(array(size 5)) at /opt/app/apache2439/htdocs/lib/pieforms/pieform.php:166, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.286213 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * Pieform::process(array(size 5)) at /opt/app/apache2439/htdocs/lib/mahara.php:5379, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.286258 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * pieform(array(size 5)) at /opt/app/apache2439/htdocs/view/delete.php:106, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.286302 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651] , referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.287753 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651] [WAR] d3 (lib/errors.php:858) Failed to get a recordset: postgres8 error: [-1: ERROR:  update or delete on table "view" violates foreign key constraint "blocinst_vie_fk" on table "block_instance", referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.287822 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651] [WAR] d3 (lib/errors.php:858) DETAIL:  Key (id)=(3969) is still referenced from table "block_instance".] in adodb_throw(DELETE FROM "view"  WHERE "id" = ? , Array)Command was: DELETE FROM "view"  WHERE "id" = ?  and values was (0:3969), referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.287874 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651] Call stack (most recent first):, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.287920 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * log_message(string(size 371), integer, true, true) at /opt/app/apache2439/htdocs/lib/errors.php:95, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.287965 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * log_warn(string(size 371)) at /opt/app/apache2439/htdocs/lib/errors.php:858, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.288022 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * SQLException->__construct(string(size 371)) at /opt/app/apache2439/htdocs/lib/dml.php:984, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.288067 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * delete_records(string(size 4), string(size 2), string(size 4)) at /opt/app/apache2439/htdocs/lib/view.php:1020, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.288112 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * View->delete() at /opt/app/apache2439/htdocs/view/delete.php:124, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.288156 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * deleteview_submit(object(Pieform), array(size 2)) at /opt/app/apache2439/htdocs/lib/pieforms/pieform.php:544, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.288201 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * Pieform->__construct(array(size 5)) at /opt/app/apache2439/htdocs/lib/pieforms/pieform.php:166, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.288245 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * Pieform::process(array(size 5)) at /opt/app/apache2439/htdocs/lib/mahara.php:5379, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.288290 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * pieform(array(size 5)) at /opt/app/apache2439/htdocs/view/delete.php:106, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.288361 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651] , referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.288608 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651] [WAR] d3 (lib/dml.php:984) Failed to get a recordset: postgres8 error: [-1: ERROR:  update or delete on table "view" violates foreign key constraint "blocinst_vie_fk" on table "block_instance", referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.288660 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651] [WAR] d3 (lib/dml.php:984) DETAIL:  Key (id)=(3969) is still referenced from table "block_instance".] in adodb_throw(DELETE FROM "view"  WHERE "id" = ? , Array)Command was: DELETE FROM "view"  WHERE "id" = ?  and values was (0:3969), referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.288710 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651] Call stack (most recent first):, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.288755 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * delete_records(string(size 4), string(size 2), string(size 4)) at /opt/app/apache2439/htdocs/lib/view.php:1020, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.288799 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * View->delete() at /opt/app/apache2439/htdocs/view/delete.php:124, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.288844 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * deleteview_submit(object(Pieform), array(size 2)) at /opt/app/apache2439/htdocs/lib/pieforms/pieform.php:544, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.288888 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * Pieform->__construct(array(size 5)) at /opt/app/apache2439/htdocs/lib/pieforms/pieform.php:166, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.288942 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * Pieform::process(array(size 5)) at /opt/app/apache2439/htdocs/lib/mahara.php:5379, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.288988 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651]   * pieform(array(size 5)) at /opt/app/apache2439/htdocs/view/delete.php:106, referer: OurURL/view/delete.php?id=3969&
[Thu Jul 27 11:48:28.289033 2023] [php7:notice] [pid 29176:tid 140526288332544] [client 111.222.111.222:64651] , referer: OurURL/view/delete.php?id=3969&

So far, the only thing i have tried is clearing the caches from the Administration page.

I looked in the database and there is indeed 1 record in the "view" table with id 3969.

The "block_instance" table contains 9 rows where "view = 3969".

How can we fix this problem ?  I am not afraid of writing a bit of SQL code to help our users quickly if that's needed.

Thanks!

  • Mahara deleting a page.png
Doris ⚡'s profile picture
Posts: 94

02 August 2023, 11:35

Hi Chris,

At first glance, it appears that the associated blocks are not getting automatically deleted on page deletion.

The quick solution to this is to manually delete the blocks on the page before attempting to delete the page.

I suggest that when you get the chance, to upgrade your site by either purchasing a subscription for 23.04 or, at minimum, upgrade to 22.10 where this is not an issue. Both code and downloadable zip archives are available.

Kind regards,

Doris

Chris K's profile picture
Posts: 3

03 August 2023, 2:33

Hi Doris,

thanks, this was helpful. 

The cause of this was that the blocks were locked in the page's parameters advanced settings.  After unlocking, we can delete the page.

Upgrading to a newer version is in my todo list

 

3 results