atk4 / atk4-addons Goto Github PK
View Code? Open in Web Editor NEWAgile Toolkit Addons
Home Page: http://atk4.com/
License: Other
Agile Toolkit Addons
Home Page: http://atk4.com/
License: Other
File: translation / lib / Controller / Basic.php
I am trying to use agile tookit model generator. As described in the documentation I am deriving my page class from Page_ModelGenerator: My page is defined like this
<?php
class page_ModelGeneratorAre extends Page_ModelGenerator {
}
But I am getting the following error:
/volume1/web/sportin/atk4-addons/mvc/Page/ModelGenerator.php:55 [2] Missing argument 1 for Page_ModelGenerator::findModels(), called in /volume1/web/sportin/atk4-addons/mvc/Page/ModelGenerator.php on line 15 and defined
/volume1/web/sportin/atk4-addons/mvc/Page/ModelGenerator.php:55 [2] Missing argument 2 for Page_ModelGenerator::findModels(), called in /volume1/web/sportin/atk4-addons/mvc/Page/ModelGenerator.php on line 15 and defined
Application Error: Method is not defined for this object
Exception_Logic, code: 0
Additional information:
class: DB
method: getAll
arguments:
0: show tables
/volume1/web/sportin/atk4/lib/AbstractObject.php:783
If you create volume, then delete it and create again with ID other than 1 it will not work.
Refer to this question: http://stackoverflow.com/questions/11245791/how-to-use-atk4-filestore-file-upload#comment14804124_11245791
The filestore must work with multiple volumes.
i've tried to use the example code in ui.highcharts.js, but i've received a blank page. The JS libraries are correctly acquired (i see an highchart.com link on the bottom of the blank graph).
atk4-addons / misc / lib / Form / Field / drilldown.php
Line 52 should be changed from
return $res+$this->drill($m);to
return $this->value_list = $res+$this->drill($m);otherwise $this->value_list don't get correct values set and field validation gives and error.
the above code do not work also:
sql looks like this: select SQL_CALC_FOUND_ROWS name,(select name from region where region.region_id = region.id ) region,id,region_id from region order by (select name from region where region.region_id = region.id ) limit 0, 25 []
my code:
class Model_Region extends Model_Table {
public $table='region';
function init(){
parent::init();
$this->addField('name')->mandatory('true');
$this->hasOne('Region_Parent','region_id');
}
}
class Model_Region_Parent extends Model_Region {
public $alias='region_parent';
}
class page_region extends Page {
function init(){
parent::init();
$crud=$this->add('CRUD');
$model = $crud->setModel('Model_Region');
$model->debug();
if($crud->grid){
$crud->grid->addPaginator();
$crud->grid->getColumn('name')->makeSortable();
$crud->grid->getColumn('region')->makeSortable();
$crud->grid->addQuickSearch(array('region','name'));
}
}
}
Reported here:
http://stackoverflow.com/questions/16451460/agiletoolkit-oauth-add-on-error-500-at-facebooks-mobile-site
Description:
I am using the OAuth Facebook controller add-on for ATK4.
What's more, is that it works fine for signups from mobile browsers (ie, when Facebook asks the user to give permission to the app).
The login flow stops with an Error 500 at: https://m.facebook.com/dialog/oauth?redirect_uri={my_url_encoded_landing_page_where_the_OAuth_controller_lives}&scope=email&client_id={fb_app_id}
What the hell is going on here? There isn't some difference between the Facebook mobile service and the regular one that the addon isn't taking care of, or is there?
Issue by fatnjazzy
Thursday Aug 08, 2013 at 17:40 GMT
Originally opened as atk4/atk4#389
Missing argument 1 for Page_ModelGenerator::findModels(), called in C:\projects\wamp\atk4\atk4-addons\mvc\Page\ModelGenerator.php on line 15 and defined
findModels signature is:
function findModels($dir, &$models, $prefix = null);
but you call it like this:
$this->findModels();
More info here: https://groups.google.com/forum/?fromgroups=#!topic/agile-toolkit-devel/AUNAjr2w_mY
Probably should be replaced by finfo().
This code
$f=$this->add('Form');
$name=$f->addField('autocomplete','name','Contact')->setModel('Contact');
$f->getElement('name')->js('change',$f->js()->submit());
Results in
Exception_Logic
Method is not defined for this object
Additional information:
class: Form_Field_autocomplete
method: allowAdd
arguments: Array ( )
BaseException
Model field was not loaded
Additional information:
Raised by object: Object Model_Comment(elexu_forum_discussion_view_commenttree_model_comment)
id: 14
field: Comment_cnt
What is this file in root of addons? I believe it's not needed because it's not implemented and not used anywhere.
CRUD displays a table where region field is not visible. Create new and update works, only list is not working properly
class Model_Region extends Model_Table {
public $entity_code='region';
function init(){
parent::init();
$this->addField('name')->mandatory('true');
$this->hasOne('Region');
}
}
The relation is defined with join() , however it's not been properly cleaned up when the filestore\Model_Image::delete() is called.
addons/mvc/lib/Model/Table.php
we have method there
function dsql($instance=null,$select_mode=true,$entity_code=null)
if one wants to use $model->dsql() and then perform non-select
operation (e.g. do_delete()), false should be set as first param, as else tables are appended with table aliases and thus create illegal sql query.
$dq = $model->dsql(null, false);
now, if you previously in the model initialisation had used
$this->setMasterField($field, $value) //e.g. "user", "1"
and then if you have a method, which is performing cleanup in following
way:
$dq->do_delete(); //assuming, that setMasterField is there
then you will have delete operation performed WITHOUT master field conditions.
if $select_mode is set to false, then conditions to dsql are not
applied. thus do_delete would clean up all records in the db :)
this is what happened in the test environment in gradpool. so not big
deal, but just be informed that setMasterField is dangerous!!!
potential solution:
Issue by romaninsh
Thursday Jun 21, 2012 at 14:55 GMT
Originally opened as atk4/atk4#69
Ability to change how filenames are generated inside filestore model.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.