Giter VIP home page Giter VIP logo

Comments (5)

givanz avatar givanz commented on May 25, 2024

Hi

Can you provide more info like sqlite and php version?

$filterArray should contain the table column names like this

$filterArray = [
	'admin_id' => [
		't' => 'INTEGER',
		'd' => NULL,
		'n' => true,
	],
	'username' => [
		't' => 'TEXT',
		'd' => '',
		'n' => true,
	],
	'role_id' => [
		't' => 'INT',
		'd' => 'NULL',
		'n' => true,
	],
	'token' => [
		't' => 'TEXT',
		'd' => '',
		'n' => true,
	],
];

$params['admin']= $this->db->filter($params['admin'], $filterArray,false);

I think there is a problem with system/db/sqlite->getColumnsMeta with your sqlite version.

getColumnsMeta runs this query to get column names

SELECT type as t, name, dflt_value as d, `notnull` as n FROM pragma_table_info('admin');

The code will be pushed to github after beta is over and bug fixes, refactoring and code cleanup is complete.

from vvveb.

bAndie91 avatar bAndie91 commented on May 25, 2024

it's PHP 8.2.10 (cli) (built: Sep 4 2023 08:11:43) (NTS) with php8.2-sqlite3 8.2.10-1+0~20230904.33+debian11~1.gbp2dc84c

i deleted storage/model/install/adminsql.sqlite.php and it got re-generated with $filterArray filled up.

from vvveb.

bAndie91 avatar bAndie91 commented on May 25, 2024

…but now it gives this on the admin panel:



Call to undefined method Vvveb\Sql\StatSQL::getOrdersCount()
/srv/web/vvveb/hmvhp/admin/controller/base.php on line 453
Code

$orderCount = $stats->getOrdersCount($this->global); // <==

		$menu             = array_insert_array_after('edit', $menu, $posts_menu);


		//products -- add to menu

		$products_menu = $this->customProducts();

		$menu          = array_insert_array_after('sales', $menu, $products_menu);


		$stats = new StatSQL();

		$orderCount = $stats->getOrdersCount($this->global);	 // <==

		$orderStatsusNew = 1;//get from site config

		$newOrders = ($orderCount['orders'][$orderStatsusNew]['count'] ?? 0);

		

		if ($newOrders > 0) {

			$menu['sales']['badge'] =  $newOrders;

			$menu['sales']['badge-class'] =  'badge bg-primary-subtle text-body float-end';

Trace

#0 /srv/web/vvveb/hmvhp/system/core/frontcontroller.php(209): Vvveb\Controller\Base->init()
#1 /srv/web/vvveb/hmvhp/system/core/frontcontroller.php(297): Vvveb\System\Core\FrontController::call()
#2 /srv/web/vvveb/hmvhp/system/core/frontcontroller.php(362): Vvveb\System\Core\FrontController::redirect()
#3 /srv/web/vvveb/hmvhp/system/core/startup.php(365): Vvveb\System\Core\FrontController::dispatch()
#4 /srv/web/vvveb/hmvhp/index.php(144): Vvveb\System\Core\start()
#5 /srv/web/vvveb/hmvhp/admin/index.php(41): include('...')
#6 /srv/web/vvveb/hmvhp/public/admin/index.php(28): include('...')
#7 {main}

from vvveb.

givanz avatar givanz commented on May 25, 2024

Thanks for feedback, I updated the generated model for sqlite install.

The code for getOrdersCount was not updated for sqlite, please redownload the zip and update vvveb/admin/sql/sqlite/stat.sql

from vvveb.

bAndie91 avatar bAndie91 commented on May 25, 2024

works. cool.

from vvveb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.