Blog Comments - Error : Array to string conversion
Hi Admin,
I encountered this "Array to String conversion" error in Blog Comments section when i tried to publish a comment.
"Severity: Notice
Message: Array to string conversion
Filename: core/MY_Model.php
Line Number: 2737"
please help me with this...
Comments
If it's early on in your project, I'd be curious if this is still an issue for you in 1.0. 1.0 has all the big modules like the blog separated out into their own repos:
https://github.com/daylightstudio/FUEL-CMS/tree/1.0
https://github.com/daylightstudio/FUEL-CMS-Blog-Module
http://docs.getfuelcms.com
1.0 hasn't officially been released yet (am hoping soon), but we are using it exclusively internally and have been for a while.
I changed the blog layouts to match my template. but dint put my hands on any Blog related php code.
will try with the version 1.0
http://localhost/projects/ILT-Fuel/ilt_fuel/index.php??fuel/dashboard
i dont know what i did wrong with the URL "index.php??fuel/"
That URL issue looks like a mod_rewrite / .htaccess issue. What is the value of your "RewriteBase" in your main .htaccess file.
and the URL issue caused by changing "$config['enable_query_strings'] = FALSE;" to TRUE.
.htaccess - RewriteBase /
if ($cache_key == '') { if (is_array($where)) { $cache_key = implode('_', array_keys($where)); } else { $cache_key = str_replace(' ', '_', $where).'_'.$model; } }
TO:
if ($cache_key == '') { $model_str = ''; if (is_array($model)) { $model_str = key($model); $model_str .= current($model); } elseif (is_string($model)) { $model_str = $model; } if (is_array($where)) { $cache_key = implode('_', array_keys($where)).'_'.$model_str; } else { $cache_key = str_replace(' ', '_', $where).'_'.$model_str; } }
Also, 1.0 is on the latest stable build of CI which has the "allow_get_array" configuration parameter (which is probably what you are needing).
And please help me with that QUERY_STRING issue
Here is my htaccess file,
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
Order Deny,Allow
Deny From All
# Allow asset folders through
RewriteRule ^(fuel/modules/(.+)?/assets/(.+)) - [L]
# Protect application and system files from being viewed
RewriteRule ^(fuel/install/.+|fuel/crons/.+|fuel/data_backup/.+|fuel/codeigniter/.+|fuel/modules/.+|fuel/application/.+|\.git.+) - [F,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php?/$1 [L]
Options -Indexes
RewriteRule .* index.php?/$1 [L]
from other admin page links the URL is fine..
tried changing Rewritebase too... still no luck with that..
Pls pls help me with this asap.. i'm closer to deliver the product to client
Modified line 95 with the following code
"str_replace('??', '?/',fuel_url($url))"
will it cause any problem !!!??
Tried the Latest FUEL version, and again encountered the same QUERY_STRING "??" problem when i set $config['uri_protocol'] = 'QUERY_STRING'; $config['enable_query_strings'] = TRUE; in config.php
And may i change "?" to "/" in SITE_URL function located at "codeigniter/core/config.php"
this
"return $this->slash_item('base_url').$this->item('index_page').'?'.$this->_uri_string($uri);"
to this
"return $this->slash_item('base_url').$this->item('index_page').'/'.$this->_uri_string($uri);"
Because when enabling QUERY_STRING it adds up a "?" before the uri string in CI config, and this with our "?" in fuel htaccess/config file leads to "??" 404 page.
I hope you can give me a solution to this without changing the CI config file.