Menu

error in cms edit_areas.php: Cannot getFiles.

Help
2008-11-13
2013-04-22
  • alessandro  bonvicini

    Hi,
    first of all thanks to have shared the phpulse.
    I am trying your interestng framework but some minor problems prevent me from doing a deep test.

    When you add a new type or area in admin tab you receive an error message
    "Cannot getFiles. Invalid directory sent." from  model.php.

    I suppose that the problem arise from wrong path setted in
        $action_dir = DOC_ROOT."includes/view/".$doctype."/actions/".$_SESSION[DOC_TYPE]['i18n']."/";

    edit_areas.php file.

    directory "view"  ,"actions" , the variable
    $_SESSION[DOC_type][i18n] does not exists so the prog crash.

    I downloaded the "all" last version package from sourceforge.

    Please, may you fix this path problem ?

    Thanks in advance
    Alex 

     
    • Owen Rubel

      Owen Rubel - 2008-11-13

      Thanks for the update. I'm taking a look at this right now and will get back to you with an update or a patch within the next 24 hrs. This looks like a simple issue with the path being incorrect. I have the code setup in a test environment so I'll see whats going on and try to duplicate your issue real quick.

       
    • Owen Rubel

      Owen Rubel - 2008-11-13

      For the record, the $_SESSION[DOC_type][i18n] variable always exists. It is used to determine the language of the page in the CONTAINER. You can add supported languages if you wish to support other languages besides english and detect other languages besides english. This variable determines the language of of the users browser, whether out applications supports it and (if it does) sets the variable to that language. If our application does NOT support it, it sets it to the default (which right now is 'en' for english.

      This is all set in the CONTAINER class. PHPulse steals from higher end MVC frameworks by separating the CONTAINER from the Model/View/Controller. Most keep it in the index.php but we create a separate class for it which pulls the MVC struct to generate the page. the index.php just instantiates the class.

       
    • Owen Rubel

      Owen Rubel - 2008-11-14

      In checking out the code, it's running fine from a default install. My best guess is that you have you CONTROLLER_DIR constant set incorrectly in your config file.

      define("CONTROLLER_DIR",DOC_ROOT."includes/projects/controllers/".DOC_TYPE."/");

      This normally doesn't need to be changed but if you moved your projects file (or changed your directory structure) this will fail. The easiest solution? Try to restore the original directory structure and config. Otherwise, redownload, dump your sql and move it over and move over any files that you added.

       
    • alessandro  bonvicini

      Sorry,
      but my controller_dir is correct and the normal interface work.
      Only admin iface, when you log as admin,admin does not work. the same is in the online version.

      As i said in my previous post I did not find any path like "views" and "action" as is searched in the edit_areas.php . the problem is there and probably you have not updated this code from a previous version.

      Please take a look in this files.
      Thank
      Alex

       
    • Owen Rubel

      Owen Rubel - 2008-11-17

      Is the admin tab giving you a blank page? what is the error that you are getting when you go to the admin tab? I thought you were just having an issue with getFiles???

      I must not be understanding your issue. Can you explain in detail because this could be a variety of thins depending on what it you are seeing and the error message that is being sent.

       
    • alessandro  bonvicini

      Ok
      try to login ad admin/admin by user tab.
      List all types, click "add" on area level .

      You' ll see a blank page.
      If you go back the message from add_areas.php "ptoblema getting list of files" arise

      I think that the problem is due to the path composition routine in add_areas.php , when it search for php classes in /views/action dir theat, in current distribution  does not exists.
      Alex

       
      • Owen Rubel

        Owen Rubel - 2008-11-18

        Ok gotcha. Blank page is generally a smarty error. Easy to troubleshoot. I can fix it from my side and get the patch in. Thanks. I'm seeing a couple other errors that I'm wanting to fix as well that are in the admin tab as well. I'll get those fixed and issue a new patch.

         
    • Owen Rubel

      Owen Rubel - 2008-11-18

      Found the error. In the Edit_AREAS.php Controller, there is a variable set for the path for reading in all the controllers ($action_dir). You were right in saying that it was a problem with a path but not with the variable that you thought. I changed it to the following :

      $action_dir = DOC_ROOT."includes/projects/controllers/".$doctype."/";

      And now it works fine. Sorry for the inconvenience and thanks for the good eye. I'll get this fix in and up tonight.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.