Error in import view on creation of new page

edited April 2015 in Bug Reports
Hallo,
I am familiar with codeigniter, but new to fuelCMS.
So I just installed the system on my hosted webspace and everythings seemed to work fine.
Then I tried to create my first page. I wanted to upload an existing file, because my goal is a migration from an existing CI page to fuelCMS.

On creating the new site, the CMS correctly shows the popup that a file of similar name is in the view directory.
When I press "Yes, upload" nothing seems to happen, but in the JS console there is an "500 internal server error" with following details:

A PHP Error was encountered
Severity: Warning

Message: explode() expects parameter 2 to be string, array given

Filename: MX/Modules.php

Line Number: 165

A PHP Error was encountered
Severity: Warning

Message: array_pop() expects parameter 1 to be array, null given

Filename: MX/Modules.php

Line Number: 167

A PHP Error was encountered
Severity: Warning

Message: implode(): Invalid arguments passed

Filename: MX/Modules.php

Line Number: 170

An Error Was Encountered
Unable to locate the file: .php

Same error occurs while trying to upload a file from the local file system.

Anyone had this problem before?

KR
Habib

Comments

  • edited 7:35PM
    What kind of contents does the view file have that it is trying to upload? If there is a lot of other PHP code, then it may throw some errors.
  • edited April 2015
    Hi,

    find the content under http://files.familiepleines.de/verein.php.txt

    Perhaps the CDATA block is the problem?

    Of course in the upload directory I use the file without the txt extension

    KR
    Habib
  • edited 7:35PM
    Ok... the cdata block isn't causing the problem... without cdata it remains the same error response:

    A PHP Error was encountered

    Severity: Warning

    Message: explode() expects parameter 2 to be string, array given

    Filename: MX/Modules.php

    Line Number: 165

    A PHP Error was encountered

    Severity: Warning

    Message: array_pop() expects parameter 1 to be array, null given

    Filename: MX/Modules.php

    Line Number: 167

    A PHP Error was encountered

    Severity: Warning

    Message: implode(): Invalid arguments passed

    Filename: MX/Modules.php

    Line Number: 170

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


    Error

    html,body { margin: 20px 0 10px 0; padding: 0; }
    body { font: 11px Arial, Helvetica, sans-serif; text-align: center; }
    h1 { margin: 0; padding:0; font-family: Arial,Helvetica,sans-serif; font-size: 22px; color: #999; font-weight: normal; padding: 10px 4px 5px 0; }
    p { font-size: 12px; margin: 0 0 10px 0; line-height: 15px; }
    a { color: #690; text-decoration: none; }
    a:hover { color: #333; text-decoration: underline; }
    #error_general { width: 500px; margin: auto; border: 1px solid #ddd; padding: 0 20px 20px 20px;}



    An Error Was Encountered

    Unable to locate the file: .php



  • edited 7:35PM
    Hmm... I'm not sure and unable to replicate the problem even with your txt file. You may need to dig into the code some. The import functionality mostly resides in the Fuel_pages::import method which is called from the fuel/modules/fuel/controller/pages.php controller "import_view".
  • edited 7:35PM
    perhaps I have another problem?
    I created a new page and entered some data in the Heading and body part...

    On calling the page http://fuel.familiepleines.de/menschen the same error appears...
  • edited 7:35PM
    Perhaps. What does your layout look like for that page and it may be good to debug the Fuel_page::render_cms function to see where the issue may be.
  • edited 7:35PM
    Find the layout with the 3 blocks unter http://files.familiepleines.de/layout.zip
    I will later debug the code
    Thanks so far!
  • edited 7:35PM
    You problem had to do with your main layout on line 8 where you are calling this:
    $this->load->view($params);
    The first parameter should be a string value to a view path and NOT an array of values:
    $this->load->view('_blocks/header',$params);
  • edited 7:35PM
    Was something in my header or footer file.... Got it working now :-)
Sign In or Register to comment.