Welcome Guest, Not a member yet? Register   Sign In
CodeExtinguisher 2.0 Release Candidate 14.2

finally, after few hours of playing with CE I find it really useful, but..

I think I found a bug. I couldn't edit my one to many table, as it was throwing an error trying to
UPDATE `tabela2` SET `tabela1_id` = -1 WHERE `tabela1_id` = '5'

I had to correct function prepForDelete() (onetomany.php line 53)
I replaced
tabela1_id column is foreign key null column

CE2.0 rc14.2, CI 1.6.3

One thing I find hard is that I'm unable to customize foreign key column name (tabela1_id from the above code) the way I can do with primary key column name and 'primary_key' parameter


and one more thing, I had to set 'session_data' text null (instead of not null), cause when starting CE with backend.php it was throwing
A Database Error Occurred

Error Number: 1364

Field 'session_data' doesn't have a default value

INSERT INTO ci_sessions (session_id, session_start, session_last_activity, session_ip_address, session_user_agent) VALUES ('54bdde5b41df02bcf8bb1814052453b3', 1216234002, 1216234002, '', 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv')

There is one more error.
Imagine three tables:


there are two OneToMany definitions (in auctions.yml and subjects.yml)

Now, when I try to add new auction, it errors:
Error Number: 1054

Unknown column 'auctions_id' in 'where clause'

SELECT * FROM (`photos`) WHERE `auctions_id` = '1'

I found that error occurs in onetomany.php file. When working in subjects-photos scope (recursive, second call to OneToMany constructor), it gets the
initialized with
(line 14 of onetomany.php file) (the value is 'auctions' - it doesn't take the fact, that it's a recursive call, and 'master' table is different - should have the value of 'subjects').
The fast workaround of this error is to follow this line with sth like this:
$master_table = substr($this->element_name, 0, strpos($this->element_name, '['));
        if ($master_table != '')
            $this->local_table = $master_table;

It allows to work with auctions. One can define subjects for auction. It only starts crashing when you try to add subject while adding auction.

Not sure if this has been mentioned, don't see it, but I am having an issue with this coming up in the View Modes at the bottom of the page: if($parts['filename'] == $this->view_mode) echo 'selected="selected"';

The error from the source:

<h4>A PHP Error was encountered</h4>

<p>Severity: Notice</p>
<p>Message:  Undefined index:  filename</p>
<p>Filename: default/codex_choosers.php</p>
<p>Line Number: 16</p>

</div><div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">

<h4>A PHP Error was encountered</h4>

<p>Severity: Notice</p>
<p>Message:  Undefined index:  filename</p>
<p>Filename: default/codex_choosers.php</p>
<p>Line Number: 17</p>

</div>></option>           </select>

No matter if I select default or the blue, that error is popping up. Any ideas?

[quote author="jTaby" date="1215809641"]Palino, you want to specify a table_access_restriction.[/quote]

Thanks jTaby, works great.

Can i do something similar with data coming from ManyToMany plugin? Is it possible to filter it?



[eluser]Majd Taby[/eluser]
no, but you can very easily add that functionality

I noticed that with this version, you're returning all the rows - that's a little problematic with 2000 rows of data being returned. Is there a switch or way to not do it that way?

no by default because codex was not designed for that, but it should be pretty straightforward to create a plugin for that.

[IGNORE]hi i seem to be getting this error in the view modes box:
A PHP Error was encountered Severity: Notice Message: Undefined index: filename Filename: clean_blue/codex_choosers.php Line Number: 16[/IGNORE]

if you did read the above error as stated by ywftdg has anybody else other than ywftdg and myself who has experienced this also i am using 1.6.2 (if that helps)

I had this long post about what could have been wrong then i realised that the 'filename' array for pathinfo() is not available in php 4 it is only available in php 5.2.0+

Theme © iAndrew 2016 - Forum software by © MyBB