zpbase 1.2 theme error

Since the issue creation for zpbase on Github is disabled, I have to report it here.

When using zpbase 1.2 under Zenphoto 1.6RC, I get an error entry in the debug log file. This happens every time while selecting "Options" -> "Theme" in the admin backend. In the theme options panel, many options are also missing then (e.g. all font adjustments). Older Zenphoto versions works fine.

{30032:Mon, 21 Nov 2022 11:57:17 GMT}
USER ERROR: mysqli Error: ( SELECT value FROM [prefix]options WHERE name= AND ownerid=0 AND theme='zpbase' ) failed. mysqli returned the error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND ownerid=0 AND theme='zpbase'' at line 1 in /xxx/yyy/zp-core/classes/class-dbmysqli.php on line 80
trigger_error called from dbMySQLi->query (class-dbmysqli.php [80])
from dbMySQLi->querySingleRow (class-dbmysqli.php [95])
from getThemeOption (functions.php [2061])
from customOptions (admin-functions.php [638])
from admin-options.php [3049]

Comments

  • acrylian Administrator, Developer

    zpBase and others have not yet been tested and/or updated for 1.6 and also not been tested with PHP 8+. We probably will only get to that after the actual release.

    But thanks for letting us know about the missing issues. I was sure we had them open as we have for zenji.

  • acrylian Administrator, Developer

    Issues are now enabled.

  • david1pro Member
    edited November 21

    For those interested, even though it's not a supported theme, zpBootstrap does not work with 1.6. In checking the source HTML of the resulting page once activated, it stops writing the page in the head at <title>

    From basic testing, it is the call to getMainSiteName() that seems to cause failure. Is there another call that will do the same thing for 1.6?

    For me, as I have one site and the whole thing has one name, I just swapped this out with gettext('MySite'sName') and that seems to function correctly.

  • sphoto Member
    edited November 21

    The error must be related to the option type "OPTION_TYPE_NOTE". When I remove all those arrays in the themeoptions.php it works. Therefore I think the problem is not in zpbase, but in Zenphoto 1.6RC!

  • acrylian Administrator, Developer
    edited November 21

    From basic testing, it is the call to getMainSiteName() that seems to cause failure. Is there another call that will do the same thing for 1.6?

    Although zpBootstrap is not the topic here: getMainSiteName() and getMainSiteURL() are deprecated in 1.6RC but got lost somehow on the way too early. They are back now. But getParentSiteTitle() and getParentSiteURL() should be used.

  • acrylian Administrator, Developer

    The error must be related to the option type "OPTION_TYPE_NOTE". When I remove all those arrays in the themeoptions.php it works. Therefore I think the problem is not in zpbase, but in Zenphoto 1.6RC!

    OPTION_TYPE_NOTE is a valid constant for an "non functional" option. So the issue is something else and probably zpBase. But as said after 1.6. is out we will look at getting these compatible.

Sign In or Register to comment.