ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Modular Extensions - HMVC version 5.4

January 29, 2011 1:58am

Subscribe [99]
  • #121 / Sep 18, 2011 2:55pm

    liri

    50 posts

    @wire - I can’t think of anything that I have done in particular that “changed” this behavior. I have used hmvc so far with the 2.0-develop branch (did a checkout somewhere around Feb-March) with no problems except for now when I tried upgrading both hmvc and CI to the latest develop checkout.

    My upgrade is simple… I downloaded latest source code of hmvc from bitbucket - download is: wiredesignz-codeigniter-modular-extensions-hmvc-d28d24e26397 which as I double checked today it’s the latest code changes.

    I cloned the develop branch:

    remote.origin.url=https://github.com/EllisLab/CodeIgniter.git
    branch.develop.remote=origin
    branch.develop.merge=refs/heads/develop

    I copied over all the checked out code to my application and then copied the hmvc code to it’s place as well. I can’t see what is wrong or out-dated in my method.


    Can we possibly cross-reference other related to parts to see where this is failing? as you say that you don’t have this issue…

    Also, maybe the methods of creating controller classes have changed? I created a MY_Controller in application/core which extends CI_Controller and all of my modules are extending MY_Controller. Anything else you can think of?

  • #122 / Sep 18, 2011 3:25pm

    liri

    50 posts

    I should also add that if I add:

    public $_ci_classes = array();

    To HMVC’s MX_Loader class everything is working fine…

  • #123 / Sep 20, 2011 12:25am

    Keat Liang

    29 posts

    i encounter this sometime, after refresh it is gone. and insight for this ?

    Strict Standards: Declaration of MX_Lang::load() should be compatible with that of CI_Lang::load() in /Dropbox/www/application/third_party/MX/Lang.php on line 0
    
    Strict Standards: Declaration of MX_Loader::library() should be compatible with that of CI_Loader::library() in application/third_party/MX/Loader.php on line 0
    
    Strict Standards: Declaration of MX_Loader::helper() should be compatible with that of CI_Loader::helper() in application/third_party/MX/Loader.php on line 0
    
    Strict Standards: Declaration of MX_Loader::helpers() should be compatible with that of CI_Loader::helpers() in application/third_party/MX/Loader.php on line 0
    
    Strict Standards: Declaration of MX_Loader::language() should be compatible with that of CI_Loader::language() in application/third_party/MX/Loader.php on line 0
    
    Strict Standards: Declaration of MX_Loader::_ci_get_component() should be compatible with that of CI_Loader::_ci_get_component() in application/third_party/MX/Loader.php on line 0
  • #124 / Sep 20, 2011 12:46am

    wiredesignz

    2882 posts

    @Keat Liang, Those are PHP5.x E_STRICT errors.

    All previous versions of Codeigniter had suppressed E_STRICT errors. You will notice in index.php the code error_reporting(-1) which enables every PHP error level for some reason.

    Simply change this to E_ALL for development and they will go away. (Until PHP5.4 at least)

    You might want check the error descriptions on http://php.net/manual/en/function.error-reporting.php if you are concerned about this.

  • #125 / Sep 20, 2011 12:51am

    Keat Liang

    29 posts

    @Keat Liang, Those are PHP5.x E_STRICT errors.

    All previous versions of Codeigniter had suppressed E_STRICT errors. You will notice in index.php the code error_reporting(-1) which enables these errors for some reason.

    Simply change this to E_ALL for development and they will go away.

    Yo might want check the error descriptions on http://php.net/manual/en/function.error-reporting.php if you are concerned about this.

    thanks,

    according to http://my.php.net/manual/en/errorfunc.constants.php

    E_STRICT message just a suggestion. not an error or something..

  • #126 / Sep 20, 2011 12:56am

    wiredesignz

    2882 posts

    Yes just a suggestion.

    In this case the message is warning that we have different number of arguments in the overload methods of the MX classes compared to the CI classes.

    It’s not a problem. Just something to consider for the future I guess.

  • #127 / Sep 20, 2011 10:56am

    liri

    50 posts

    Hey wiredesignz,

    Can we please continue investigating the issue with 2.0.3/2.1.0-develop branch of CI from github regarding integrating with hmvc 5.4?

    I have provided some more info with the hope of getting this solved:
    http://ellislab.com/forums/viewreply/937062/ and http://ellislab.com/forums/viewreply/937065/ (#121 and #122)

    I think it’s simply required to add the modification I mentioned on #122 to hmvc to make it compatible with CI develop branch.

    You said you have tried hmvc 5.4 and CI develop branch and did not find any issues?

  • #128 / Oct 09, 2011 8:09am

    sineld

    14 posts

    I have moved my applications to HMVC modular. Everyting is allright except post variables.

    I post any data with any form but it returns empty, does not post actually.

    I debug it:

    print_r($_POST);
    die;

    even though there is post data the follwing appears:

    array()

    What is the wrong with my code?

    Thanks.

  • #129 / Oct 09, 2011 9:30pm

    rahendz

    13 posts

    howdy, i’m new on this..

    can anybody help me to figure this out

    $ext = $this->config->item('controller_suffix').EXT;

    where ‘controller_suffix’ pointing? there’s no ‘controller_suffix’

    in my ‘config.php’..

    thanks before

  • #130 / Oct 10, 2011 12:05am

    broncha

    9 posts

    @sineld

    You access the post data like this:

    print_r($this->input->post());
  • #131 / Oct 10, 2011 12:07am

    broncha

    9 posts

    @rahendz
    Just incase u use it. 😊

  • #132 / Oct 19, 2011 9:40am

    rickster

    6 posts

    I have been using CI properly for just under a week now, so I’m a bit of a nub at it. But I really like this extension and would like some guidance on how to jquery’s ajax post to submit a form. I found an article on developerworks but it doesn’t take into account the HMVC extension.
    Here’s a snippet of what I have got. Any advice would be more than welcome.

    Code in view

    $.post("ajax/add_comment", {'comment_text': comment_text, 'post_id': getpID, 
          'author_id': <?php echo($this->session->userdata('user_id'));?>},
           function(response){
         $('#CommentPosted'+getpID).append($(response).fadeIn('slow'));
           $("#commentMark-"+getpID).val("Write a comment…");     
    });

    and the ajax controller

    class Ajax extends MX_Controller {
    
      public function Ajax() {  
        parent::Controller(); 
      }
    
      public function add_comment()
      {
        $data = array(
            'date' => date() ,
            'author' => $_REQUEST['author_id'] ,
            'text' => $_REQUEST['comment_text'],
            'parentComment' => $_REQUEST['post_id']
        );
        $this->db->insert('comments', $data);     
        return true;
      }  
    
    }
  • #133 / Oct 19, 2011 9:45am

    broncha

    9 posts

    I have been using CI properly for just under a week now, so I’m a bit of a nub at it. But I really like this extension and would like some guidance on how to jquery’s ajax post to submit a form. I found an article on developerworks but it doesn’t take into account the HMVC extension.
    Here’s a snippet of what I have got. Any advice would be more than welcome.

    Code in view

    $.post("ajax/add_comment", {'comment_text': comment_text, 'post_id': getpID, 
          'author_id': <?php echo($this->session->userdata('user_id'));?>},
           function(response){
         $('#CommentPosted'+getpID).append($(response).fadeIn('slow'));
           $("#commentMark-"+getpID).val("Write a comment…");     
    });

    and the ajax controller

    class Ajax extends MX_Controller {
    
      public function Ajax() {  
        parent::Controller(); 
      }
    
      public function add_comment()
      {
        $data = array(
            'date' => date() ,
            'author' => $_REQUEST['author_id'] ,
            'text' => $_REQUEST['comment_text'],
            'parentComment' => $_REQUEST['post_id']
        );
        $this->db->insert('comments', $data);     
        return true;
      }  
    
    }

    You dont access the post data like $_REQUEST[‘post_id’]
    use

    $this->input->post('post_id')
  • #134 / Oct 19, 2011 11:23am

    rickster

    6 posts

    sorted!
    made them changes plus had to change

    public function Ajax() {  
        parent::Controller(); 
      }

    to

    public function Ajax() {  
        parent::__construct(); 
      }

    thanks for the help

  • #135 / Oct 27, 2011 1:33pm

    iansane

    41 posts

    Hey wiredesignz,

    I already have phpar(active record) and sparks installed so a MY_Loader already exists extending CI_Loader.

    It is not possible to drop your version of MY_Loader into the core directory because one already exists.

    Can you help me with the code to insert in my already existing MY_Loader.php so this will work?

    Plugins and extensions really shouldn’t all come with their own version of MY_Loader.php because this limits them to being the only extension that can be used on a project.

    phpactiverecord should also include the code block for the MY_Loader instead of providing a whole MY_Loader.php

    IMHO

    Bottom line is that MY_Loader can’t extend CI_Loader and also extend MX_Loader. Hopefully I’m just misunderstanding these instructions https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/wiki/Home

    Thank you

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases