Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

Fuel page Variables

edited March 2015 in Bug Reports
I have this website running on fuel, I have several opt-in controllers, i want them to carry individual page variables. Following what is here http://docs.getfuelcms.com/general/opt-in-controllers, i did all but viewing the page in the browser shows this

[meta name="keywords" content="<!-html comment--__FUEL_MARKER__0-->companies, hiring now"]
[meta name="description" content="[<!-html comment--]__FUEL_MARKER__1-->Companies hiring on graduate career"]
[title] <!-html comment-__FUEL_MARKER__4-->Companies : My Website [/title]

I have rewritten the HTML code because the post editor converts it to html and they don't show.
Please how do i fix this.

Thanks for your regular support

Comments

  • edited 4:14PM
    The FUEL_MARKER code usually stays on the screen if there is some sort of PHP error that stop execution of the page. Are you seeing any PHP errors? Those markers get cleaned up in the Fuel_pages.php file upon rendering unless there is an error.
  • edited March 2015
    There is no error on the page
  • edited 4:14PM
    Are you logged into the CMS when viewing the page? If not, I would try logging into the CMS and clearing the pages cache in case the page was viewed at some point when there were errors and it was compiled and cached.

    If that doesn't work, are there any function calls or variables being embedded in your views, header or footer that may not be defined?
  • edited 4:14PM
    I have tried both options, clearing page cache and also checking to see that no error is on the page. Please alternatively how do i solve this problem.

    Secondly i have a list of name to be exported out of a database, i set the module to be exportable which does that right, Now i want a filter say, should only export people that registered between jan1-feb1

    Will be looking forward to hear from you ASAP

    Thanks for your regular support
  • edited 4:14PM
    Please am still expecting your reply on the above discussion thread. Thanks
  • edited March 2015
    Does your list view (the view that has the button to export the data) have filters on it to just display people between that date? If not, you can try adding the following to your module's config in MY_fuel_modules.php:
    $modules['my_module']['filters'] = array( 'registered_date_from' => array('type' => 'date'), 'registered_date_to' => array('type' => 'date') ); $modules['my_module']['advanced_search'] = TRUE;
    Note that if you provide the suffixes on your field names of "_from", "_fromequal", "_to", "_toequal", "equal" it will use comparison operators (e.g. >, >=, <, <=, =). Additionally, note the 'advanced_search' parameter.

    This parameter will simply add a clickable arrow in the search field that tucks your filtering away and doesn't clutter up the UI.
  • edited 4:14PM
    Thanks so much for your response,
    Well i have tried the above code..only if am not placing it well,

    'exportable' => TRUE,
    'filter' => array('date_added' => array('type' => 'datetime'), 'date_added' => array('type' => 'datetime')),
    'displayonly' => TRUE,
    'advanced_search' => TRUE,
  • edited April 2015
    Try adding "_from" and "_to" like so:
    'filters' => array('date_added_from' => array('type' => 'datetime'), 'date_added_to' => array('type' => 'datetime')),
  • edited 4:14PM
    Thanks for your response, i have tried this too, i have even change the name in the database to date_added_from not working still.

    Please what do i do next
  • edited 4:14PM
    In the Base_module_model::list_items method (found at fuel/modules/fuel/models/base_module_model.php) there is a commented out line for $this->debug_query(); If you uncomment that, it will generate the SQL query being generated which will help debug that issue. What are you seeing in that query?
  • edited April 2015
    here is what I see SELECT id, firstname, lastname, email, phone_number, account_status, date_added_from FROM (`yl_open_account`) ORDER BY `firstname` asc LIMIT 50

    Thanks
  • edited 4:14PM
    Are you able to see the filters in your search filtering area (the little triangle that when clicked shows the filters)?

    In your model's list_items method, what does the filter property have when run:
    public function list_items(....) { .... print_r($this->filters); }

    Also, I wouldn't change the name of the field to date_added_from but just leave it as is.
  • edited 4:14PM
    Ok..thanks
    For the search filter, yes and when i click on the image, it brings a dropdown and displays the following

    Advanced Search

    Search button Close Reset Search
    No form to select anything from

    this is what i get from print_r($this->filters);
    Array
    (
    [firstname] =>
    )
  • edited 4:14PM
    I think the problem had to do with a typo in my original response where I used "filter" as the key instead of "filters" (I've updated it above).
  • edited 4:14PM
    Wow...Thanks so much it's working now

    Array ( [firstname] => [date_added_from] => 2015-01-01 00:00:00 [date_added_to] => 2015-04-30 00:00:00 )

    A bottle of bear for you

    :)
  • edited 4:14PM
    Please i want to ask a question, does Fuelcms or codeigniter have trusted host mechanism for now, I have check forums and did not find any

    Thanks in advance
  • edited 4:14PM
    We don't have a "trusted" host so to speak. We do deploy a lot of FUEL sites to MediaTemple and Webfaction servers though.
Sign In or Register to comment.