YES! Thanks a bunch, I would've looked for that for quite a while.
On a side note, I tried adding 'display_preview' => TRUE to my field, assuming I'd get a preview of the selected image beside the field in the form. I see nothing and nothing s…
I've found the source of the problem. It is not related to the column type. In fact, the crash occurs anytime I try to sort a column that has an alias containing a space (in my list_items function).
For example, sorting de TEXTE column if...
$th…
Ok, got it. If I use the array for my WHERE parameters, this is the generated query:
SELECT fuel_blog_posts.*, fuel_blog_users.display_name, CONCAT(fuel_users.first_name, " ", fuel_users.last_name) as author_name, YEAR(fuel_blog_posts.post_date) as…
This is what's being generated:
SELECT fuel_blog_posts.*, fuel_blog_users.display_name, CONCAT(fuel_users.first_name, " ", fuel_users.last_name) as author_name, YEAR(fuel_blog_posts.post_date) as year, DATE_FORMAT(fuel_blog_posts.post_date, "%m") …
The find_all() call is not generating the error, it is originating from the where clauses. Everything works fine if I remove these (all the posts are returned).
Commenting out the blocks relationship in blog_posts_model has no effect (I had already…
That is indeed the one I want, but I had already tried it. Same type of error:
Unknown column 'fuel_blog_categories.slug' in 'where clause' SELECT `fuel_blocks`.* FROM (`fuel_blocks`) WHERE `fuel_blog_categories`.`slug` = 'cat1' OR `fuel_blog_cat…
D'oh, I could've/should've caught that. The same typo is in the last line. Should be:
$cat_posts = $CI->blog_posts_model->find_all();
But now I'm getting a DB error:
Unknown column 'blog_categories.slug' in 'where clause' SELECT `fuel_blocks…
Ok, I understand the logic, but I can't target the blog_posts_model. I'm getting an error:
Message: Undefined property: Page_router::$blog_posts
My BLOG module is in "./fuel/modules/blog", default install - no changes. I'm using Fuel 1.2.1.
What …
Ok great! It might seem clear to another user, but an added example/clarification to the docs would've greatly helped me (and perhaps even prevented me from taking up some of your time). Thanks again for the help!
Yes it does. If I use the base_module_model::ajax_options() logic in my method to return a formatted html list, the dependent field works fine. Here's my method:
function ajax_get_groups_by_division_id($div) { $options = $this->groups_m…
It wasn't assigned to any element. I didn't really get what the "replace_selector" was for. If I understand correctly now, it should be the class or id of the element which is to be replaced.
And if I don't use a "replace_selector" attribute, then…
Ok, I was looking in Network -> XHR (using Firefox Dev Edition) but I didn't see the RESPONSE tab when I selected the AJAX request.
Yes, "test string" is being returned. I also tried the original code and it was returning the object. I can also…
Do you mean something like this?
function ajax_get_groups_by_division_id($div) { $data = "test string"; return $data; }
If so, still nothing. I select something from the DIVISION dropdown, the GET request is sent, but nothing refreshes on the page.
…
Yes. If I select domething in the DIVISION list, a GET request is sent, like this one:
http://localhost:9090/1-DURABAC-MASTER2/admin/groups/ajax/get_groups_by_division_id?id_division=3
However, the following errors are thrown in the console:
Refer…
It's rather large. Here are the relevant fields: (I can send more details if needed)
$CI->load->model('divisions_model'); $divisionList = $CI->divisions_model->options_list('divisions_id', 'division_name'); $fields['id_division'] = ar…
I get the exact same results when using an array - 'js' => array('hello').
In the documentation, a string is used both for inlining the code and including a file (http://docs.getfuelcms.com/general/javascript#modules).
I'm getting the following JS errors in the console (using the second scenario):
If the js filename matches the field name $fields['my_field'] ... 'js' => 'myfield' I get the following error: "TypeError: my_field is not a function"
If the js f…
Awesome! Both of these work great! Just what I needed. Thanks!
BTW, typo in your 1st suggestion: should be a bracket after "productsheet" --> $pages[':any/productsheet$'] = array('var1' => 'var1_value');
It is being echoed in the view file, inside a foreach loop:
<?php foreach ($products as $product) : ?> ... <?php echo $product['schema_fr']; ?> ... <?php endforeach; ?>
$products is being passed to the view as a global variable …