• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CodeExtinguisher 2.0 Release Candidate 14.2

[eluser]tpowalka[/eluser]
Hi,
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
Code:
UPDATE `tabela2` SET `tabela1_id` = -1 WHERE `tabela1_id` = '5'

I had to correct function prepForDelete() (onetomany.php line 53)
I replaced
Code:
-1
with
Code:
null
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

tomek

[eluser]tpowalka[/eluser]
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
Code:
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, '127.0.0.1', 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv')

[eluser]tpowalka[/eluser]
There is one more error.
Imagine three tables:
Code:
auctions
  id

subjects
  id
  auctions_id

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

Now, when I try to add new auction, it errors:
Code:
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
Code:
$local_table
initialized with
Code:
$this->CI->codexadmin->db_table;
(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:
Code:
$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.

[eluser]ywftdg[/eluser]
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:

Code:
<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?

[eluser]Palino[/eluser]
[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?

Regards

Palino

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

[eluser]tylderdurden[/eluser]
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?

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

[eluser]steel_slasher[/eluser]
[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)

[eluser]steel_slasher[/eluser]
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+


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.