Yii Framework Forum: [EXTENSION] phundament - Yii Framework Forum

Jump to content

  • (11 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

[EXTENSION] phundament Phundament 3: Yii CMS based upon independent modules and extensions Rate Topic: ***** 3 Votes

#1 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 13 October 2011 - 08:21 PM

Phundament 3 is an application foundation built upon a set if independent Yii modules and extensions such as user, rights, yiiext, gtc, ckeditor, jquery-file-upload, p3widgets and p3media.

The combination of p3widgets and p3media provides basic content management system (CMS) features, like dynamic widget creation and file management.
Combined in ckeditor, p3media acts as a ckfinder plugin which gives you the full power of HTML and media files for content creation via p3widgets.

It comes with a very minimalistic setup which integrates perfectly into an Yii web application skeletion and installs with one single command.

Extension Page (Download, Installation, ...)
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
3

#2 User is offline   luc 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 211
  • Joined: 22-June 10
  • Location:france

Posted 20 October 2011 - 02:34 AM

from: extension page:

Quote

Hi Schmunk ! This is really a good job that will save time to developers. It was not so easy to install: migrations of rights and p3media gave me mysql errors because of the foreign keys.
Once the application running I'm having now routes troubles:
- rights: only assignment controller and its actions can be resolved, authItem controller and all its actions give a "404 not found" error
- yii-user: same problem with the profileField controller and its actions
- p3media: same problem with the p3Media controller - gii: same problem with "fullCrud" and "fullModel"

and finally: also in gii: portlet generator give me an exception: "PortletGenerator.widgets.ddeditor.DDEditor is invalid" (in protected/extensions/gtc/portlet/views/__comment.php line (9))


More informations:
- linux dev box with php 5.3.2, mysql 5.1.41 , apache 2.2.14 , yii 1.1.8
- I have had to comment all the stuff related to foreign keys in the migration files to be able to install the application
Hey Ho !
Let's go !
0

#3 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 20 October 2011 - 04:36 AM

@luc:
I am a bit confused ... the demo page runs also on Linux, with almost the same setup as yours?!

Which download did you grab, the one from Yii extensions?

Please post the non-working URLs here, starting from index.php or your webapp folder.

For debugging ... can you try to set in config/main urlManager:
'urlFormat' => 'get',

and see if this makes any difference.

Were the tables created as MyISAM instead of InnoDB?

When we've fixed this, we'll move on to the gii stuff.


Thanks,
schmunk
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#4 User is offline   luc 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 211
  • Joined: 22-June 10
  • Location:france

Posted 20 October 2011 - 09:25 AM

Thank you for help.

Well, do not panic too much ;-)
I've installed the same phundament distribution (the one from the yiiframework/extensions/phundament page) on an another computer (with almost the same configuration) and, except the troubles with migrations, application works well.

Non working urls:
  • /rights/authItem/permissions
  • /rights/authItem/roles
  • /rights/authItem/tasks
  • /rights/authItem/operations
  • /user/profileField/admin
  • /user/profileField/view/1
  • /user/profileField/update/1
  • /p3media/p3Media/admin
  • /p3media/p3Media/6
  • /gii/fullCrud
  • /gii/fullModel


weblog messages always showing: "Loading "XXX" module" with XXX= p3media, gii, rights or user and after that, throw a Http 404 exception.

Also:
  • Alias "CommandGenerator.widgets.ddeditor.DDEditor" is invalid while calling /gii/command
  • Alias "PortletGenerator.widgets.ddeditor.DDEditor" is invalid while calling /gii/portlet


Changing urlFormat from "path" to "get" give same error with for example: ?r=rights/authItem/permissions

Database tables:
some of them were created as MySam (the four "migration_module_XXX", "p3widget", the three "usr_XXX" user related tables) and other as InnoDb (the four tables for rights module, "p3_media", "p3_media_meta")
Hey Ho !
Let's go !
0

#5 User is offline   luc 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 211
  • Joined: 22-June 10
  • Location:france

Posted 20 October 2011 - 11:07 AM

Hi again,

a fresh new install is working fine (except, database migrations and errors while calling portletgenerator and commandgenerator).
Why ? I don't know yet.

Thank you for great job.


Luc
Hey Ho !
Let's go !
0

#6 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 20 October 2011 - 11:21 AM

Nice! No panic yet :)

So p3media, user, rights, ... is working fine?
Can you post the shell output when running migrations?
And portletgenerator and commandgenerator are the ones from gii (gtc)?
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#7 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 20 October 2011 - 05:10 PM

Is this about the same problem?
https://github.com/s...3admin/issues/1

Something is going wrong with the foreign keys, but I can't tell it yet.
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#8 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 20 October 2011 - 05:19 PM

While looking at it ... could you try fixing the case for the referenced table.

$this->addForeignKey('fk_authitem_parent', 'AuthItemChild', 'parent', 'authitem', 'name', null, null);

$this->addForeignKey('fk_authitem_parent', 'AuthItemChild', 'parent', 'authItem', 'name', null, null);


in /protected/modules/p3media/migrations/m110719_000000_init.php

But since you're having also problems with p3_media this does not really make sense.
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#9 User is offline   luc 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 211
  • Joined: 22-June 10
  • Location:france

Posted 21 October 2011 - 03:46 AM

View Postschmunk, on 20 October 2011 - 11:21 AM, said:

Nice! No panic yet :)

So p3media, user, rights, ... is working fine?
Can you post the shell output when running migrations?
And portletgenerator and commandgenerator are the ones from gii (gtc)?


./yiic migrate --migrationPath=application.modules.p3admin.modules-install.rights.migrations --migrationTable=migration_module_rights --interactive=1


gives:
applying m110402_195159_init
    > create table AuthAssignment ... done (time: 0.159s)
    > create table AuthItem ... done (time: 0.092s)
    > create table AuthItemChild ... done (time: 0.085s)
    > create table Rights ... done (time: 0.084s)
    > add foreign key fk_authitem_parent: AuthItemChild (parent) references authitem (name) ...exception 'CDbException' with message 'CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1005 Can't create table 'yii_p3.#sql-4d6_36c' (errno: 150). The SQL statement executed was: ALTER TABLE `AuthItemChild` ADD CONSTRAINT `fk_authitem_parent` FOREIGN KEY (`parent`) REFERENCES `authitem` (`name`)' in /var/www/yii/yii-1.1.8.r3324/framework/db/CDbCommand.php:336


Migration for p3item is not applied.

./yiic migrate --migrationPath=application.modules.p3media.migrations --migrationTable=migration_module_p3media --interactive=1

return no error

gtc command generator:
Alias "CommandGenerator.widgets.ddeditor.DDEditor" is invalid. Make sure it points to an existing PHP file.

error comes from file: protected/extensions/gtc/command/views/__comment.php

Hope it helps !

Cheers.
Hey Ho !
Let's go !
0

#10 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 21 October 2011 - 07:34 AM

Hi Schmunk :)

I'll check it out Real Soon Now - but take a look at this in the mean time:

http://stackboxcms.com/

It looks very familar, no? :)


"Less noise - more signal"
0

#11 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 21 October 2011 - 07:38 AM

Nice, definitely inspiring.
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#12 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 21 October 2011 - 08:26 AM

They do have HMVC to help them out, but it is extremely close to Phundament IMO. :)

Especially the P3 widgets.


"Less noise - more signal"
0

#13 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 21 October 2011 - 11:35 AM

I didn't put much work into the UI yet, because it has to be fully functional first.
But I'll will keep this in mind.

I've also added the automatic property detection for all widgets, see screenshots.
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#14 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 25 October 2011 - 07:39 PM

Just released Phundament 3-0.2, get if from http://www.yiiframew...ion/phundament/
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#15 User is offline   Majestic 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 138
  • Joined: 28-March 11
  • Location:Germany, Stuttgart

Posted 19 November 2011 - 05:39 AM

Hi schmunk,

I just downloaded and tried to make phundament3 run. But I have some issues with the image uploader.
When i open the "upload" Page, the console error I get is:

Uncaught TypeError: Object [object Object] has no method 'prop'
jQuery.extend._Deferred.deferred.resolveWithjquery.js:869
jQuery.extend.readyjquery.js:420
DOMContentLoadedjquery.js:1055


The problem seems to be with the "prop" function call
$.getJSON($('#fileupload form').prop('action'), function (files) {

in the file "protected/extensions/p3extensions/widgets/jquery-file-upload/init.js".

Also when dropping a file in the browser a new error shows up ... also not knowing what to do with the function "prop".

Uncaught TypeError: Object [object Object] has no method 'prop'
$.widget._loadImagejquery.fileupload-ui.js:284
$.widget._renderUploadjquery.fileupload-ui.js:420
jQuery.extend.eachjquery.js:639
jQuery.fn.jQuery.eachjquery.js:263
$.widget._renderUploadjquery.fileupload-ui.js:419
$.widget.options.addjquery.fileupload-ui.js:67
b.Widget._triggerjquery-ui.min.js:23
$.widget._onAddjquery.fileupload.js:568
jQuery.extend.eachjquery.js:639
$.widget._onAddjquery.fileupload.js:562
$.widget._onDropjquery.fileupload.js:637
jQuery.event.handlejquery.js:2562
jQuery.event.add.elemData.handle.eventHandle


My OS is Windows 7 ... maybe that could be the problem? During the installation everything seemed to be fine. - no errors.
... In your demo the image uploader works fine by the way.
0

#16 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 19 November 2011 - 07:47 AM

@Majestic:
Looks like an outdated jQuery version, did you try to run phundament with Yii 1.1.8?
Also, I am currently making some includes from CDNs here, so this won't work offline yet.
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#17 User is offline   Majestic 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 138
  • Joined: 28-March 11
  • Location:Germany, Stuttgart

Posted 19 November 2011 - 10:33 AM

Ahh, thanks a lot! ... sorry for that (still had Version 1.1.6 running :-P)

Now the drag & drop seems to work, but a new error appears after pushing the "upload" button (in the column to the right of the file size)

In Chrome:
Error: SyntaxError: Unexpected token <


In Firefox:
Error: SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data 


The answer of the Server looks like this:
[{"name":"54th.jpg","size":42017,"type":"image\/jpeg","url":"\/test-phundament\/p3media\/p3Media\/update?preset=raw&path=1%2F54th.jpg","thumbnail_url":"\/test-phundament\/p3media\/file\/image?preset=thumb&path=1%252F54th.jpg","delete_url":"\/test-phundament\/p3media\/import\/uploadFile?path=1%2F?file=54th.jpg","delete_type":"DELETE"}]<br />
<font size='1'><table class='xdebug-error' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Fatal error: Call to undefined function mime_content_type() in C:\xampp\htdocs\test-phundament\protected\modules\p3media\controllers\ImportController.php on line <i>231</i></th></tr>
.
.
.

0

#18 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 19 November 2011 - 11:40 AM

Yeah, I also stumbled upon that ... the function is deprecated, this is the hotfix :) Just include it "somewhere".

<?php
if (!function_exists('mime_content_type ')) {
    function mime_content_type($filename) {
        $finfo    = finfo_open(FILEINFO_MIME);
        $mimetype = finfo_file($finfo, $filename);
        finfo_close($finfo);
        return $mimetype;
    }
}
?>

Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#19 User is offline   ametad 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 78
  • Joined: 08-February 12
  • Location:Holland

Posted 06 March 2012 - 04:32 AM

Hello Schmunk,

First of all I want to say what a good work you do, making a base for a CMS. It looks very nice!

I am very new at all of this; php, yii, phundament, .. Hopefully my question will not sound too stupido and you can help me in the right direction. This is my first post here at the yii forum.

After installation of P3 I get an "error 500 Yiic command not found (./yiic)" clicking the Manage-link (h++p://localhost/phundament/p3admin/module?module=p3widgets)on the "Phundament 3 administration"-page. In fact the only Manage-link that doesn't give me this error are the first (h++p://localhost/phundament/p3admin/module?module=p3admin) and the last one (h++p://localhost/phundament/p3admin/module?module=gii).

Is this the way it supposed to be or is this not right? Some help here will be apriciated very much.


Setup:
- Win7
- apache
- PHP 5.3
- MySQL

The steps I took:
1. extracted framework directory of yii-1.1.10 in same root folder as where phundament will be placed (htdocs/phundament)
2. extracted phundament3 in htdocs/phundament
3. setup MySQL database for p3
4. commandline in Aptana: phundament/protected/setup-p3.sh phundament/framework/yiic
5. step1 runs, no problems, webapp is made in htdocs/phundament
6. before step 2 (db migration) I configure the protected/config/main.php file to use the MySQL database.
7. run step 2 by typing 'y' at the commandline, migration runs fine
8. run step 3 ... , no problems!
9. open webpage in browser, looks fine and most of all works also fine.
0

#20 User is offline   Sampa 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 173
  • Joined: 18-December 11
  • Location:Stockholm,Sweden

Posted 06 March 2012 - 05:55 PM

Installing rights can be a bitch, You have to create the tables in this order to prevent foreign keys errors:

tbl_authItem
//then I think the rest doesnt matter.

This is because authAssignment and others tries to put foreign keys to authItem. And if authItem doesnt exist... well there u have your error.

Re arrange the order the tables are written in the .sql file would solve this for everyone in the future:p
0

Share this topic:


  • (11 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users