Thank you very much for this extension. However, I found two errors (to be confirmed) and I’ve one suggestion :
Error 1 I’m hosted on 1and1 and I noticed an error on line 597 (php T_object error). I’ve not this error on my local server. To solve the problem on 1and1, I replaced
$SESS->cache['lg'][LG_DM_addon_id]['field_query'] = $DB->query("SELECT field_name, field_id, lg_field_conf FROM exp_weblog_fields f WHERE f.field_type='".$this->type."' AND site_id = " . $site_id)->result;
by
$tmp = $DB->query("SELECT field_name, field_id, lg_field_conf FROM exp_weblog_fields f WHERE f.field_type='".$this->type."' AND site_id = " . $site_id);
$SESS->cache['lg'][LG_DM_addon_id]['field_query'] = $tmp->result;
It may be better to split the line to be sure to be valid with every site host.
Error 2 I have some errors in the Edit pages when I use quotes in “text” fields. The browsers don’t differentiate these quotes from the “value” attribute quotes of the “input” tag. I wonder if it’s normal. I fixed these errors by replacing on line 1176
$cell = "<input value='{$value}' name='field_id_{$this->field_id} {$col['short_name']}][]' type='text' >";
by
$cell = "<input value='".stripslashes(htmlspecialchars($value, ENT_QUOTES))."' name='field_id_{$this->field_id}[{$col['short_name']}][]' type='text' >";
AND on line 556
$rows[] = $post_rows[$row_count];
continue 2;
by
if (get_magic_quotes_gpc()) {
foreach ($cells as $i => $celli) {
$cells[$i] = stripslashes($celli);
}
}
$rows[] = $cells;
continue 2;
I may mistake. But it seems to work.
Suggestion Finally, why not formatting the “textarea” fields when we call them in the templates ? I mean “xhtml”, “none”, “p” formats like with normal textarea fields. I’ve added some kind of text formatting in the extension with the EE class “Typography”. Leevi, let me know by PM if you are interested by these modifications. It must be improved but it’s enough for my needs.
Cheers.
Wow, what an awesome add-on! Too bad I’m just now finding it, because I really could have used it on my last project (isn’t that how it always works?). I have this running in a sandbox environment on my local machine, and I’ve found one minor issue. I noticed that the Add Row link wasn’t working at all, so I started checking out the source code of the publish page. jQuery and jQuery UI were linked correctly, but admin_publish.js was not. This is what line 849 of the extension’s file looks like:In my particular instance, my EE system folder’s URL is http://localhost/sandbox/admin/. Line 849 is not taking into account the “/sandbox” portion of the URL, as it is hard-coded to have the system folder be at the root level. Could this extension be modified to fix the linked path for this file, short of going into the plugin and changing it by hand? I don’t have a problem with changing it by hand, but I’d also have to remember to do it every time it gets updated. Thanks, and keep up the great work!$js .= "\n<script type='text/javascript' charset='utf-8' src='/" . $PREFS->ini('system_folder') . "/extensions/lg_data_matrix/scripts/admin_publish.js'></script>";
I think it’s not a bug but a problem in your file “config.php”. There is a variable called “system_folder” which is generated automatically during the install of EE thanks to the answers you gave. During the install, you must enter the “full path to your system folder” and not only “the name of the system folder”.
I would like to add to the requests for making this work on the Stand Alone Entry Form! I don’t mind adding some javascript to my headers, but it’d be ideal if through an extension, this could work on the SAEF too, the same way it does on the CP.
Edit: or even if I have to hard-code the fields etc in, I don’t mind that! I hard-code everything in my SAEF anyway because I lay it all out in specific tables - I just can’t figure out how to make the JS work to add multiple rows on my SAEF. I tried copying the exact JS from the headers of the CP page, and the exact coding for the fields there, but the extension must be hooked in only into the CP form? Or something? I know too little about extensions to figure it out - anyone have any bright ideas?
I think it’s not a bug but a problem in your file “config.php”. There is a variable called “system_folder” which is generated automatically during the install of EE thanks to the answers you gave. During the install, you must enter the “full path to your system folder” and not only “the name of the system folder”.
I’m afraid I’ll have to disagree with you on this one. See the attached image. There is no mention on this page of putting the full path to the control panel anywhere… just the name of the system folder. It is also not generated automatically, as it must be specified. There is a setting on the next page of the install for the CP’s full URL (“cp_url”), which is automatically generated, and is set correctly in my config.php file. Now, if that is supposed to include the path as well, then perhaps EllisLab should rewrite the copy on that page to express that… but I’m still unconvinced that this is the intent.
Still though, thanks for your help… and I think we’re on the right track. :)
I’ve gone back to using Mark’s multi text extension for now, as this doesn’t seem to like text that contains apostrophies or quotes (not fully tested yet to see which). i.e. I can’t enter 12’3”x14’6”
I’ll report back once I’ve worked out exactly what it is that’s throwing the “unserialise” error.
I’ve gone back to using Mark’s multi text extension for now, as this doesn’t seem to like text that contains apostrophies or quotes (not fully tested yet to see which). i.e. I can’t enter 12’3”x14’6” I’ll report back once I’ve worked out exactly what it is that’s throwing the “unserialise” error.
Steve, I just noticed the same thing, I have a text field that contains something like “John’s Website” and I get an unserialize error due to the apostrophe. I’ll probably try encoding them to be safe, but it would be nice if this could handle quotes and/or apostrophes.
I’ve gone back to using Mark’s multi text extension for now, as this doesn’t seem to like text that contains apostrophies or quotes (not fully tested yet to see which). i.e. I can’t enter 12’3”x14’6” I’ll report back once I’ve worked out exactly what it is that’s throwing the “unserialise” error.
Hey guys,
Here’s the quick fix for now!
Around line 600 of ext.lg_data_matrix.php find:
$_POST['field_id_' . $row['field_id']] = ($rows !== FALSE) ? serialize($rows) : '';
and replace it with:
$_POST['field_id_' . $row['field_id']] = ($rows !== FALSE) ? addslashes(serialize($rows)) : '';
That should do the trick until the next version
I’m getting a blank Extensions Manager page. I double checked the installation guide and I’m sure I did it right, except for the fact that my customer’s hosting doesn’t allow filenames with +, so I changed the jquery script filename to “jquery.ui.core-interactions.1.6.min.js”.
Could it be a PHP memory issue? it has 20MB. I don’t have permission to modify it, but I could request it.
Thank you!
Update: it was the hosting all along.
I’m running into an odd problem where the pathing for the scripts needed for this extension don’t seem to work. They’re not very “portability friendly”, as they reference absolutely from the root of the web-server path, and don’t for when EE is installed in a subfolder.
Here’s a snippet from the ext.lg_data_matrix_ext.php that I think is the culprit:
$js .= "\n[removed]ini('system_folder') . "/extensions/lg_data_matrix/scripts/admin_publish.js'>[removed]";
if my root path for the website is:
/home/foobar/htdocs/
and I have EE installed under /home/foobar/htdocs/ee/ (and hence, system path for EE at /home/foobar/htdocs/ee/system), the above extension code tries to search for admin_publish.js at /home/foobar/htdocs/system …
any way to get around this? at the moment i’m developing under one path, and will want to change the root path when i launch, so something flexible and not requiring that I remember to update a section on launch would be great …
cheers for a nice extension otherwise!
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.