Part of the EllisLab Network
   
2 of 4
2
CodeExtinguisher v2.0 Release Candidate 13
Posted: 14 May 2008 03:09 PM   [ Ignore ]   [ # 11 ]  
Grad Student
Rank
Total Posts:  33
Joined  10-05-2006

well, i’m here ‘extending’ codexsession class.
the class extends from Native_Session and adapts some methods receive codex calls properly.
but i had a problem. to extend codexsession i needed to require_once-it using require_once(APPPATH.’libraries/Native_Session.php’) and i’m getting the following error:

Message: require_once(codex/application/libraries/Native_Session.php) [function.require-once]: failed to open stream: No such file or directory

i echoed APPPATH and i’m getting ‘codex/application/’, but i need the full path to that directory.

i think the problem is in line 109 of backend.php. it asks if $application_folder is a directory and it is. so the following lines defines APPPATH as a relative directory.

this behavior doesn’t happens with the codeigniter’s index.php, where is_dir($application_folder) returns false and the else is executed.

the fast answer could be ‘ok, just define APPPATH as BASEPATH.$application_folder.’/’. this is wrong, because BASEPATH == $system_folder.’/’ and $system_folder == ‘system’ so APPPATH yields ‘[full-path-to-my-webapp]/system/codex/application’.

by now i’m going to fix it mannualy.

Profile
 
 
Posted: 15 May 2008 09:30 AM   [ Ignore ]   [ # 12 ]  
Grad Student
Rank
Total Posts:  31
Joined  05-08-2008

Here’s the error I’m getting now.  I’m not using anything that’s not in the Example, which works fine.

------------------------------------------------------
A PHP Error was encountered
Severity: Notice
Message: Undefined index: class
Filename: libraries/codexforms.php
Line Number: 53
------------------------------------------------------

I feel like I’m getting conflicting information from three different sources:

The Screencast (http://codeextinguisher.com/screencasts/Intro_to_CodeExtinguisher/index.html)
The Documentation (http://www.codeextinguisher.com/index.php/documentation)
The Wiki (http://codeextinguisher.pbwiki.com/)

I’mn not sure what instructions/formats I should be following.

------------------------------------------------------
Table:
------------------------------------------------------
CREATE TABLE `daily_devotion` (
`id` int(11) NOT NULL default ‘0’,
`start_publish_date` datetime NOT NULL default ‘1970-01-01 00:00:00’,
`end_publish_date` datetime NOT NULL default ‘1970-01-01 00:00:00’,
`scripture` text NOT NULL,
`verse` varchar(40) NOT NULL default ‘ ‘,
PRIMARY KEY (`id`)
)

------------------------------------------------------
Definition (daily_devotion.yml):
------------------------------------------------------
form_setup:
scripture:
class: TextArea
verse:
class: TextBox
start_publish_date:
class: Date
end_publish_date:
class: Date

------------------------------------------------------
Controller (dailydevotion.php):
------------------------------------------------------
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
include_once("codexcontroller.php");

class DailyDevotion extends codexController
{
function DailyDevotion ()
{
codexController::codexController();

$rules['scripture'] = "trim|required";

$config = array(
'db_table' => 'daily_devotion', //The name of the table associated with this controller
'form_setup' => $this->spyc->YAMLLOAD($this->codexadmin->getDefinitionFileName('daily_devotion')), //The array that holds our elements
'controller_name' => 'DailyDevotion', //The name of the controller, so that it can be used when generating the URLs
'primary_key' => 'id', //The name of the controller, so that it can be used when generating the URLs
'display_fields'=>array('scripture','verse','start_publish_date','end_publish_date'),
'rules'=>$rules
);
$this->setConfig($config);
}
}
?>

Profile
 
 
Posted: 15 May 2008 10:22 AM   [ Ignore ]   [ # 13 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  301
Joined  05-29-2006

The documentation is not updated.... See the code.... grin

 Signature 

CI Js_calendar plugin click

WYSIWYG with CI

Profile
 
 
Posted: 15 May 2008 01:42 PM   [ Ignore ]   [ # 14 ]  
Grad Student
Rank
Total Posts:  33
Joined  10-05-2006

i’m getting the following error:

Fatal error: Call to undefined method CodexMessages::getAsArray() in C:\Inetpub\wwwroot\sim\codex\application\controllers\login.php on line 45

i search getAsArray in codexmessages and i don’t find it.

ideas?

Profile
 
 
Posted: 15 May 2008 01:53 PM   [ Ignore ]   [ # 15 ]  
Grad Student
Rank
Total Posts:  33
Joined  10-05-2006

arghhh…

Severity: Warning

Message: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user
Filename: libraries/codexlogin.php
Line Number: 104

mysql?? this puts me out of the game :(

Profile
 
 
Posted: 15 May 2008 02:37 PM   [ Ignore ]   [ # 16 ]  
Grad Student
Rank
Total Posts:  31
Joined  05-08-2008

I think I found a bug in the date.php plugin.  I was getting invalid integer errors, so I looked at the usage of mktime in the prepForDisplay function.  The month and day values should be wrapped with intval() to prevent days and months with a leading 0 (as in 05) from being treated as octal values.  I added the intval() to my local copy of ‘date.php’ and the errors went away.

Profile
 
 
Posted: 15 May 2008 02:40 PM   [ Ignore ]   [ # 17 ]  
Grad Student
Rank
Total Posts:  31
Joined  05-08-2008

I’m still getting the following error when I first login (and only when I first login):

--------------------------------------------------------------
A PHP Error was encountered
Severity: Warning
Message: array_slice() expects parameter 2 to be long, string given
Filename: controllers/codexcontroller.php
Line Number: 104
--------------------------------------------------------------

Profile
 
 
Posted: 15 May 2008 03:04 PM   [ Ignore ]   [ # 18 ]  
Grad Student
Rank
Total Posts:  31
Joined  05-08-2008

A little more detail on the above error:

I guess the interface defaults to “Example” (any way to change that?). And if there are no records for that table then $this->first_item is null.

Profile
 
 
Posted: 15 May 2008 06:50 PM   [ Ignore ]   [ # 19 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  660
Joined  06-07-2007

I’m sorry you guys are having problems, but I want to thank you for helping me find them, it’s hard to properly test all parts of a system like this especially when I don’t have a suit of test to run (which is my fault)

I’ll address your issues in a release soon.

 Signature 

CodeExtinguisher
Download: codex2_rc14.2.zip - 219 KiloBytes of Gloriousness!
Demo: Public preview - login with preview:preview
Temporary Docs: PBWiki

Profile
 
 
Posted: 15 May 2008 08:43 PM   [ Ignore ]   [ # 20 ]  
Grad Student
Rank
Total Posts:  31
Joined  05-08-2008

No need to apologize, you’ve done incredible work on this.  Even though it took me a while to work through some of the bugs and less documented features, the end result is something that is saving me a huge amount of time.  Thank you very much for you awesome contribution!

Profile
 
 
   
2 of 4
2
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 61065 Total Logged-in Users: 14
Total Topics: 73886 Total Anonymous Users: 1
Total Replies: 398529 Total Guests: 337
Total Posts: 472415    
Members ( View Memberlist )
Active Members:    audioplebbscottCraig RodwayCrucialgazzaGDmacLuci3nmwmerzoutrageSarah PearsonTanquetgo_detomcode