rcoelho / giix Goto Github PK
View Code? Open in Web Editor NEWgiix is Gii Extended, a code generator for Yii PHP framework – with extras!
Home Page: http://www.yiiframework.com/extension/giix
License: Other
giix is Gii Extended, a code generator for Yii PHP framework – with extras!
Home Page: http://www.yiiframework.com/extension/giix
License: Other
Hi,
Here is the error:
Property "CPhpMessageSource.extensionBasePaths" is not defined.
I'm using Yii 1.10
What steps will reproduce the problem?
What is the expected output?
The model should have a rule that sets those fields to their respective default values if empty.
What do you see instead?
A rule that sets them to NULL if empty.
What version of giix are you using?
1.9.1
What is your stack (operating system, web server, DBMS, PHP version)? MacOS, Apache2, MySQL 5.1.53, PHP 5.3.6
What version of the Yii Framework are you using? 1.1.9
Please attach your relevant source and configuration files and sql scripts.
CREATE TABLE `community_user` (
`community_id` varchar(50) NOT NULL COMMENT 'The community',
`user_id` int(10) unsigned NOT NULL COMMENT 'The existing user',
`banned` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'Defines if a user is banned from this specific community',
`newsletter` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'Is the user subscribed to the newsletter for this community',
`email_notification` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT 'If the user accepts to receive notifications by email',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The time the user joined this community',
PRIMARY KEY (`community_id`,`user_id`),
KEY `communityuser_user` (`user_id`),
KEY `community_index` (`community_id`),
CONSTRAINT `communityuser_user` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Defines which user belongs to which community';
Method:
Set up a two linked tables with a nullable relation in database.
model is correctly scaffolded by giix where in rules, you can see that the relation is not marked as required.
When scaffolding the controller/view, does not add a null option to the top of the dropdown list because giix is automatically finding all possible attributes, but does not take into consideration if the field is nullable.
echo $form->dropDownList(
$model,
'entity_id',
GxHtml::listDataEx(MODEL_NAME::model()->findAllAttributes(null, true))); ?>
An extension should come with translations included.
I am using giix as submodule and dont want to edit the messages folder because then I have to make changes and commit them somewhere that other clones can see those changes as well.
The messages folder should include the translations even if there are currently no translations in any/all languages
I would like to see variable documentation in the templates for crud generation like this:
<?php
/* @var $model User */
/* @var $this UserController */
/* @var $form CActiveForm*/
?>
Hi! In GiixCrudCode class, methods generateGridViewColumn and generateSearchField generates labels for checkbox displays strict in English language. I offer to replace strict labels "No", "Yes" and "All" to Yii:t('app', ...). It'll support multilanguage in extension. Thanks!
I've downloaded (actually cloned) giix from GitHub to my extensions directory and followed the installation instructions to the letter. At first I tried it without running the CPhpMessageSource.patch because comments seemed to suggest that the issue had been fixed. Then, I got the message "Unable to resolve the request "gii/giixModel" when trying to run GiixModel Generator.
I went back and applied the patch (although it took me quite a while to find CPhpMessageSource.php since I most definitely don't need the i18n functionality). I then tried to run GiixModel Generator again. Again, it gave me the error message Unable to resolve the request "gii/giixModel".
When I tried a "dry-run" on patch CPhpMessageSource.php, it returned the following message (which may be why the problem occurs):
$ patch -p0 --dry-run < CPhpMessageSource.patch
patching file CPhpMessageSource.php
Hunk #1 FAILED at 62.
Hunk #2 FAILED at 94.
2 out of 2 hunks FAILED -- saving rejects to file CPhpMessageSource.php.rej
Any suggestions on what I may be doing wrong or how I can get around this issue? This really looks like a wonderful extension. I would hope that the functionality would be incorporated into the Yii base soon.
I've looked everywhere I can on Google and other places for a resolution to this problem, and while I can find several mentions of it, I can't seem to find any resolution. Basically, the problem is this:
Hi, i'm using this new version and I'm editing it to integrate with the bootstrap existing extension.
In my tests, however, I found that the records displayed by the method generateActiveRelationField (in update action) are not properly trimmed as checkboxes.
Only the first one is "checked".
static function GxActiveRecord::saveMultiple() accesses $this, which is illegal... and will break sooner or later.
Thanks,
Arnaud.
In fillPkColumnNames method
vvv this bracket wrong
throw new InvalidArgumentException(Yii::t('giix.messages', 'The count of values in the argument "pk" ({countPk}) does not match the count of columns in the composite PK ({countColumns}).'), array(
'{countPk}' => count($pk),
'{countColumns}' => $columnCount,
));
giix-components/GxController.php line 160
...
if (Yii::app()->getRequest()->getIsAjaxRequest() && (($form === null) || ($_POST['ajax'] == $form)))
...
change:
($_POST['ajax'] == $form)
to:
(isset($_POST['ajax']) && $_POST['ajax'] == $form)
Hi there,
Just wondering if every time I save a new MANY_MANY relationship model, is it possible to preserve the old data? Each time I insert something new, say a new photo, which is linked by MANY_MANY relationship, the SaveRelated method will automatically remove all my old relation.
It is not practical to include all the data in my form every time when I just need to add something new. Perhaps you can add an "append" option in your SaveWithRelated and SaveRelated function, and use it to stop the deleting process?
I found nother SaveRelated extension from yii before, they are providing this feature where I found it quite useful, Please consider to modify it if possible.
Thank you.
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.