Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter dollariusg

    (@dollariusg)

    Running the query with PhpMyAdmin, I understood that the problem is the following error:
    #1709 - Index column size too large. The maximum column size is 767 bytes.
    I did not understand why this happens only for the authors table. I read that this can be solved by setting on the MySQL server
    SET GLOBAL innodb_default_row_format=DYNAMIC;
    Unfortunately, this command does not work for me (possibly because I do not have the right privileges).

    So, as a temporary solution, I changed the file teachPress/core/class-tables.php row 748 from
    ) $charset_collate;");
    to
    ) ROW_FORMAT=DYNAMIC, $charset_collate;");

    Now the author table is properly created by the “install database” command, and the authors get populated upon import. This solved my issue.

    It remains a mystery to me why the “default” teachpress tables with the standard prefix “wp_” appear in the listing of PhpMyAdmin after running the “Remove teachPress from database” command (I saw that your function runs only DROP TABLE commands).

    Thank you very much for your support!
    Please let me know in case you need additional information to possibly avoid similar issues in future releases of teachPress.

    Thread Starter dollariusg

    (@dollariusg)

    Dear winkm89, thanks a lot for your suggestions.
    I understood the problem: there are missing tables in my database.
    This is certainly due to the fact that I have used a prefix different from the standard “wp_”.

    Doing some debugging, I noted that by running “Remove teachPress from database”, there are the following 20 standard (empty) tables created by teachpress:

    wp_teachpress_artefacts
    wp_teachpress_assessments
    wp_teachpress_authors
    wp_teachpress_courses
    wp_teachpress_course_capabilites
    wp_teachpress_course_documents
    wp_teachpress_course_meta
    wp_teachpress_pub
    wp_teachpress_pub_capabilites
    wp_teachpress_pub_documents
    wp_teachpress_pub_imports
    wp_teachpress_pub_meta
    wp_teachpress_relation
    wp_teachpress_rel_pub_auth
    wp_teachpress_settings
    wp_teachpress_signup
    wp_teachpress_stud
    wp_teachpress_stud_meta
    wp_teachpress_tags
    wp_teachpress_user

    Upon clicking “Install database”, only 18 of these tables are correctly renamed to my chosen prefix “QMwp_”. Two are not renamed (“assessments” and “authors”), while one appears twice (“artefacts”).

    QMwp_teachpress_artefacts
    QMwp_teachpress_assessments
    QMwp_teachpress_courses
    QMwp_teachpress_course_capabilites
    QMwp_teachpress_course_documents
    QMwp_teachpress_course_meta
    QMwp_teachpress_pub
    QMwp_teachpress_pub_capabilites
    QMwp_teachpress_pub_documents
    QMwp_teachpress_pub_imports
    QMwp_teachpress_pub_meta
    QMwp_teachpress_relation
    QMwp_teachpress_rel_pub_auth
    QMwp_teachpress_settings
    QMwp_teachpress_signup
    QMwp_teachpress_stud
    QMwp_teachpress_stud_meta
    QMwp_teachpress_user
    wp_teachpress_artefacts
    wp_teachpress_assessments
    wp_teachpress_authors

    On a quick look into your code, I could not identify where the problem is. Do you have any indication?
    Thank you.

    Thread Starter dollariusg

    (@dollariusg)

    Hi winkm89, and thanks a lot for your support.

    I enabled the DEBUG, but I do not get any error messages while either adding manually, importing, or deleting a publication.

    I checked the database index as you suggested and in the new installation both wpOld_teachpress_authors and wpOld_teachpress_tags are empty (i.e., only the table headers are visible).
    I checked the same thing on the old installation (by manually changing only the files without updating the database) and both wpNew_teachpress_authors and wpNew_teachpress_tags have one line containing “PRIMARY BTREE No” etc.
    I tried this after separately performing in both installations a “remove teachPress from Database” (to start fresh) and importing the same BibTex file.

    The system details are
    – Old, working: PHP v7.3.8, mysqlnd 5.0.12-dev, WordPress 5.0.1, teachPress 6.2.5
    – New, not working: PHP v7.3.17, mysqlnd 5.0.12-dev, WordPress 5.4, teachPress 7.0.3

    Any further idea to solve the mystery?

Viewing 3 replies - 1 through 3 (of 3 total)