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

Jump to content

  • (11 Pages)
  • +
  • « First
  • 8
  • 9
  • 10
  • 11
  • 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

#181 User is offline   echo66 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 66
  • Joined: 06-May 10

Posted 25 February 2013 - 08:06 PM

Yup. And i even tried to update, as you said. But i got this error:

echo66@echo66-VirtualBox:/var/www/Phundament3$ php composer.phar update 
Welcome to Phundament Installation 3 via composer

Updating your application to the lastest available packages...
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package crisus83/yii-seo could not be found in any version, there may be a typo in the package name.
  Problem 2
    - Installation request for phundament/app 1.0.0 -> satisfiable by phundament/app 1.0.0.
    - Can only install one of: phundament/app 0.11.1, phundament/app 1.0.0.
    - Installation request for phundament/app 0.11.1 -> satisfiable by phundament/app 0.11.1.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.


0

#182 User is offline   echo66 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 66
  • Joined: 06-May 10

Posted 25 February 2013 - 08:16 PM

I managed to solve the update problem, by removing, from composer.json, the entries listed in that error. Still, the problem with Metadata class continues...
0

#183 User is offline   schmunk 

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

Posted 25 February 2013 - 09:57 PM

This one is just a typo, I think.
crisus83/yii-seo => crisu83/yii-seo


And ... the metadata class has short open tags :(
Could you try adding 'php' in the first line of vendor/phundament/p3admin/components/Metadata.php

<?php
/**
 * Metadata Helps to get metadata about models,controllers and actions in application*
 *


Please let me know, if that fixes the error.
Sorry but ... not my code ;)
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
1

#184 User is offline   echo66 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 66
  • Joined: 06-May 10

Posted 26 February 2013 - 10:09 AM

Thanks. :)

Well, now the error is

"Property "CWebUser.isSuperuser" is not defined."

It seems to be a problem in this function:

private function createReadAccessCriteria()
{
    $criteria = new CDbCriteria;
    // do not apply filter for superuser
    if (!Yii::app()->user->isSuperuser) {
        if ($this->owner->metaDataRelation != "_self_") {
            $criteria->with = $this->owner->metaDataRelation;
            $tablePrefix = $this->owner->metaDataRelation;
        } else {
            $tablePrefix = $this->owner->getTableAlias();


That field seems to be from Yii Rights extension. But, for some reason, the framework doesn't include it???
0

#185 User is offline   echo66 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 66
  • Joined: 06-May 10

Posted 26 February 2013 - 10:22 AM

I'm watching your tutorial, on youtube, to see if i forgot anything. :)

One of the things that i didn't do was including the Phundament3 within an existing yii application. Let me try that, to see the results.

See ya later and thanks :)

EDIT: oh wait, that video was made during the period that Phundament3 didn't include Yii. Hmmm...
0

#186 User is offline   echo66 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 66
  • Joined: 06-May 10

Posted 26 February 2013 - 10:35 AM

I reinstalled the whole thing and problem solved! Probably, it was my fault, the issue of super user. Thanks, schmunk!!
0

#187 User is offline   echo66 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 66
  • Joined: 06-May 10

Posted 26 February 2013 - 10:41 AM

Btw, is it supposed, in the Models tab (Backend frontpage), to have the following content???

array(3) { 'models' => array(1) { [0] => string(11) "ContactForm" } 'controllers' => array(1) { [2] => array(2) { 'name' => string(14) "SiteController" 'actions' => array(4) { ... } } } 'modules' => array(7) { [0] => array(3) { 'name' => string(3) "gii" 'controllers' => array(1) { ... } 'models' => array(1) { ... } } [1] => array(3) { 'name' => string(7) "p3admin" 'controllers' => array(1) { ... } 'models' => array(0) { ... } } [2] => array(3) { 'name' => string(9) "p3widgets" 'controllers' => array(4) { ... } 'models' => array(7) { ... } } [3] => array(3) { 'name' => string(7) "p3media" 'controllers' => array(6) { ... } 'models' => array(4) { ... } } [4] => array(3) { 'name' => string(7) "p3pages" 'controllers' => array(4) { ... } 'models' => array(6) { ... } } [5] => array(3) { 'name' => string(6) "rights" 'controllers' => array(3) { ... } 'models' => array(4) { ... } } [6] => array(3) { 'name' => string(4) "user" 'controllers' => array(10) { ... } 'models' => array(7) { ... } } } }


0

#188 User is offline   schmunk 

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

Posted 26 February 2013 - 10:42 AM

View Postecho66, on 26 February 2013 - 10:09 AM, said:

Thanks. :)

Well, now the error is

"Property "CWebUser.isSuperuser" is not defined."

[...]

That field seems to be from Yii Rights extension. But, for some reason, the framework doesn't include it???


If you want to use rights, you have to configure your application user component like this: https://github.com/p...g/main.php#L292

Or your add a method to your user class, which implements isSuperuser.

I'll try to remove that dependency also, but I've no good idea at the moment.
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

#189 User is offline   schmunk 

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

Posted 26 February 2013 - 10:44 AM

You're welcome!

About the video ... sorry I am trying to create a new one for literally months now :angry:

About the backend page ... it's work in progress, feel free to improve it and send me a pull request ;)
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

#190 User is offline   echo66 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 66
  • Joined: 06-May 10

Posted 26 February 2013 - 10:51 AM

ooooh ok ok.

I sound like a noob because, for +-1.5 years, i have been away from Yii framework. So, i forgot some things...

Btw, in order to have persistent widgets, in several pages, o i need to include, manually, in each one of those pages???
0

#191 User is offline   schmunk 

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

Posted 26 February 2013 - 10:58 AM

No, you can go to "Edit Widget Detail" (wrench-icon) and do i.e. to following setting:

container: top
module: _ALL
controller: _ALL
action name: _ALL
request param: _ALL

This widget would then appear on every page which has a container 'top'


Another example:

container: sidebar
module:
controller: mycontroller
action name: _ALL
request param: _ALL

The widget would appear in any sidebar container in all actions of your MyController.
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

#192 User is offline   echo66 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 66
  • Joined: 06-May 10

Posted 26 February 2013 - 06:35 PM

I was thinking about using this CMS in one of my projects but, because of the permissions management, i can't use it, given the timeframe at hand. And, even worse, i need to refresh some ideas about Yii and take a look about the management of modules, as you have done. STILL, i really really really like what you have done, schmunk. :) Let's hope that i can find some time to study this, even with my MsC schedule, at university.

Meanwhile, i will use Concrete5, because i'm in a hurry. :/

Hope to hear/read more from this project.

And thanks for the assistance!

:)
0

#193 User is offline   schmunk 

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

Posted 26 February 2013 - 06:40 PM

Thanks for your words :)
Just let me know if you've questions, feedback or ideas for improvement.
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

#194 User is offline   schmunk 

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

Posted 27 February 2013 - 11:00 AM

@ametad: I remember that you once had problem with yii-user and new profile fields, right? There was an error about the path aliases of yii user, as they are partially hardcoded in the module.

If you still have this issue, you can fix it by adding the following lines to config/main.php aliases

        // yii-user path fixes
        'application.modules.user.views.asset' => 'application.vendor.mishamx.yii-user.views.asset',
        'application.modules.user.components' => 'application.vendor.mishamx.yii-user.components',

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

#195 User is offline   ametad 

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

Posted 23 May 2013 - 04:02 PM

Thanks for the update... I haven't been here in months so my apologies for not replying!

I came here because there is a question on my mind about the working of p3Pages, in particular the process of how a page is being find and loaded.

These are some lines from the DefaultController actionPage():
	public function actionPage() {

		$model = null;
		$id = (isset($_GET[P3Page::PAGE_ID_KEY]) && is_numeric($_GET[P3Page::PAGE_ID_KEY])) ? $_GET[P3Page::PAGE_ID_KEY] : null;
		$name = isset($_GET[P3Page::PAGE_NAME_KEY]) ? $_GET[P3Page::PAGE_NAME_KEY] : null;

		if ($id) {
			$model = P3Page::model()->findByPk($id);
		} elseif ($name) {
			$model = P3Page::model()->findByAttributes(array('name' => $name));
... 


If there is no pageId set, the pageName will be used to try and find a P3Model bij the attribute 'name'. But this attribute does not exist!

What I am looking for is clean URL, without the digit which is the pageId, the 'id' in the P3Page model. There is a seoUrl and I want to use that as reference to find the right P3Page.. I am still looking how to do that with as much as existing code. Can you perhaps lead me in the right direction? What would be your approach?

Keep up the good work :)
0

#196 User is offline   ametad 

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

Posted 23 May 2013 - 04:09 PM

View Postschmunk, on 27 February 2013 - 11:00 AM, said:

@ametad: I remember that you once had problem with yii-user and new profile fields, right? There was an error about the path aliases of yii user, as they are partially hardcoded in the module.

If you still have this issue, you can fix it by adding the following lines to config/main.php aliases

        // yii-user path fixes
        'application.modules.user.views.asset' => 'application.vendor.mishamx.yii-user.views.asset',
        'application.modules.user.components' => 'application.vendor.mishamx.yii-user.components',



PS. I dont use the yii-user module anymore because my user management needed a lot of highly customized functionality. So I decided to modify the original module and for now there is no need to go back to the source code..
0

#197 User is offline   schmunk 

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

Posted 23 May 2013 - 05:36 PM

Hi ametad,

you're right, there's outdated code in the model, sorry about that.

From p3pages 0.11.7 on there's an optional attribute for P3Page models called "nameId", which is meant to be used as a named identifier, but you can not translate it.

We could add an option to find a page by seoUrl, but I personally don't like this approach because it's too error-prone imo.
Eg. you've set up links in your HTML content an then someone changes the seoUrl, all links are broken. But with the id every link stays intact.
Another problem would be: if you use a text like seoUrl it has to be unique and you could not use the same string for two different languages.

Btw: I've discussed this issue with a really good SEO agency. They also wanted to remove it, but in the end they said it doesn't really matter.

Looking forward to hear from you.


Best regards,
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

#198 User is offline   schmunk 

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

Posted 24 May 2013 - 07:22 AM

applied some fixes for p3pages and nameId in 0.11.8
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

#199 User is offline   ametad 

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

Posted 25 May 2013 - 03:17 AM

Hi Schmunk,
I have been busy with URL rule classes in Yii and perhaps there lies (some part of) an answer. But first I wanted to ask you, where is a good place to share these ideas? I mean, a place that is more suitable for programming code and stuff. And I am wondering if you are already using such an environment?

I am not yet familiar with a realy good one! IMHO: In Github you can only discuss code you wrote yourself and propose to someone else in a pull request (can be suitable but not for brainstorming new ideas). Realy the only things you can discuss are commits and not just existing code..

But perhaps you know and use already something?

Greetings!
0

#200 User is offline   schmunk 

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

Posted 27 May 2013 - 09:53 AM

I think it's fine to use a specific commit with "Browse Code" and link directly to the stuff you wanna talk about, like so:

https://github.com/p...mposer.json#L57

Just open an issue... cya!
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

Share this topic:


  • (11 Pages)
  • +
  • « First
  • 8
  • 9
  • 10
  • 11
  • 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