if ($access != true) { Response::redirect('users/login'); }If I disable this I get...
Notice: Undefined property: Controller_Articles::$user_id in APPPATH/classes/controller/articles.php @ line 127This is the line in question:
$article = Model_Article::find_by_id_and_user_id($id, $this->user_id);
Jelmer Schreuder wrote on Tuesday 5th of April 2011:In Fuel we have "Output filtering" instead of input filtering by default (you can switch this if you want in app/config/config.php), this means that anything passed to the view gets pushed through htmlentities to prevent XSS. Dan explained both on his blog. Objects will either have all their properties filtered or are converted to strings to be filtered when they have a __toString method. (the exception to this are objects of class View, ViewModel or Closures - and any you might whitelist yourself) Because they want to have the validation object in their view, but not filtered or cast to a string they pass it using the View::set() method with false as its last param. That switches off the filtering for the variable they're setting, thus allowing them to pass the Validation object.
Import the database.sql to your database
DROP TABLE IF EXISTS `sw_simpleusers`; CREATE TABLE `sw_simpleusers` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(50) DEFAULT NULL, `password` varchar(50) DEFAULT NULL, `email` varchar(70) DEFAULT NULL, `profile_fields` text, `group` int(11) DEFAULT NULL, `last_login` bigint(20) DEFAULT NULL, `login_hash` tinytext, PRIMARY KEY (`id`), UNIQUE KEY `username` (`username`), UNIQUE KEY `email` (`email`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; DROP TABLE IF EXISTS `sw_articles`; CREATE TABLE `sw_articles` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `user_id` int(11) unsigned NOT NULL DEFAULT '0', `category_id` int(11) DEFAULT NULL, `title` varchar(140) COLLATE utf8_unicode_ci DEFAULT NULL, `body` text COLLATE utf8_unicode_ci, `published` tinyint(3) unsigned NOT NULL DEFAULT '0', `created_time` bigint(20) unsigned DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; DROP TABLE IF EXISTS `sw_categories`; CREATE TABLE `sw_categories` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) unsigned NOT NULL DEFAULT '0', `name` varchar(140) COLLATE utf8_unicode_ci DEFAULT NULL, `description` tinytext COLLATE utf8_unicode_ci, `created_time` bigint(20) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
<<<<<<< HEADLine 126 Again i simply commented out
=======
>>>>>>> f488a6dcdcb7a7da6527f0e54dee2d666de6790cand the database sql file you have sw_simpleusers as a table when you are calling sw_users in your coding so changing the table to sw_users fixes that issue.
Notice! ErrorException [ Notice ]: Undefined index: name COREPATH/classes/form.php @ line 227: 226: { 227: $attributes['id'] = \Config::get('form.auto_id_prefix', 'form_').$attributes['name']; 228: }
David MacLean wrote on Thursday 28th of July 2011:I'm falling down on step zero.
Where do I put the files?
Seems like the download includes fuel.
Or should I copy the stuff into fuel and trust whatever overwrites... I know nothing of fuel.
I do know CI, and I'm interested in this ORM stuff.
But unsure how this stuff is laid out.
Want to see a working sample ....
The intro page is a little light...
Sorry about that, the database.sql should be available in the repo now.Chris Arnold wrote on Tuesday 26th of July 2011:I've downloaded and installed Stationwagon, however I couldn't find the database.sql file? I've used the SQL posted by PaulboCo but had to change the table names, now it's not recognising some of the fields... can anyone point me in the right direction of the database.sql file please? Thanks
A Huzz wrote on Saturday 9th of April 2011:Can't run the application Warning: require_once(E:\projects\websites\stationwagon\fuel\core\bootstrap.php) [function.require-once]: failed to open stream: No such file or directory in E:\projects\websites\stationwagon\fuel\app\bootstrap.php on line 4
/* /fuel/app/views/categories/add.php (line 23) */ <?php echo Form::submit('add_category', 'Add Category'); ?> /* /fuel/app/views/categories/edit.php (line 23) */ <?php echo Form::submit('edit_category', 'Edit Category'); ?>
It looks like you're new here. If you want to get involved, click one of these buttons!