First: This is a really nice module!

1. Everything works fine but when I want to put data in a table - just plain text - I get an error:
"The specified field contains some illegal code."

2. Just a question: where do I find a documentation how I can print out dynamic data using a table?

All the best
hausig

Comments

rbrooks00’s picture

I've noticed this as well and it seems to throw this error when you include any HTML or certain special characters. I personally think that entering HTML (for example a link) into a table is valid so it'd be really cool to see this resolved.

Regarding question 2, I found that information in the text file that comes with the installation, tells you how to invoke the tables using PHP.

pobster’s picture

Well I'm assuming you didn't use the 4.6 version at all? ;o) Tablemanager used to allow you to set which filter to use when you entered data into a table (as you would do with a normal node). Now I've not implemented this yet with this new version (it *is* to come though) but the framework is still there meaning that currently the only html you can enter, is html listed in your 'filtered_html' filter. Accepting other filters is not next on my to-do list, but it will get put back in eventually... The reason why I can't do it yet is that I'm currently in 'talks' with the good people at Drupal about coding standards and my lack of them and I'm trying to get my module written better so that I don't get into trouble!!! ;o)

Pobster
PS. I'm only joking about the trouble! They're helping me out! ;o)

pobster’s picture

...Which does mean you *should* be able to enter <a href="....">blah, blah</a> links? Please could you just confirm that the plain text you say you can't enter is in fact, not plain text and actually some html code? If it really is just some plain text, please could you post it here so that I can enter it into my own tables to test it?

Thanks

Pobster

hausig’s picture

...as I first wrote: I really tried to put in just plain text like "my name" and so on and I get the error: "The specified field contains some illegal code.". Therefore I didn't even try to put in some html.

Thanks
hausig

hausig’s picture

...but it works with letting the fields blank. It stores the empty fields and shows it, too.

- hausig

pobster’s picture

Assigned: Unassigned » pobster

PLEASE can you tell me exactly what you're trying to input? I can't test for 'something you input doesn't work' I need to test it on my own system in order to determine whats wrong. Also please tell me what system you're using, and what version of php and mysql.

I've just released a new version of tablemanager which will be packaged up tonight and be available for download tomorrow morning. It handles validation completely differently now and hopefully you shouldn't get any problems with it any more. I am however still drawn back to doing things how I used to do them so I'd appreciate your input regarding your problem...

Thanks

Pobster

hausig’s picture

Thanks for this quick reply.

I'm using PHP 5 and MySQL 4 and Drupal 4.7.

I downloaded and reinstalled the tablemanager pack yesterday. Than I activated it and built a new Table. Then I tried to fill in a "New Entry". I put in words like "hallo" (no html or php or anything else) - and got the error I described.

I hope that this is all information you need. I will try again with the version you'll provide tomorrow as you sayed.

What other information could I give?

thanks
-hausig

pobster’s picture

Okay I've had a thought (!) I assume that the new version will work fine for you? Please correct me if I'm wrong... But as I said previously I'm desperate to know the cause of your problem as several people have had the same symptoms and I'd very much like to go back to how it validated before but obviously this time ;o) Without the problems! Anyways... My thought is this... Have you played around with the filters? Not that I recall if I did or not, but I *think* that I assumed filtered_html would be '1' and php '2' lastly full_html '3'? Therefore if you've perhaps edited this (or the default) in any way then maybe it'd affect the validation? I really don't know...

Please let me know, thank you

Pobster

hausig’s picture

Great!!!

...and thanks: Now the updated version works without this error!
And I only have to translate it into German...

As you mentioned, I think the error had something to do with the filter. I had these settings:

- the table filter module activated (could this interfer with your module?),
- administrator: all rights concerning filter: filtered html, php, full html,
- all other: only filtered html.

But I noticed something after reinstalling tablemanager including MySQL tables:
Now, the filter options show only the original 3 options: filtered html, php, full html and the filter for tablefilter.module is included in the full html option.
It seems to me that this has changed after reinstallation: I think that the last option apeared as a separate fourth option before reinstalling - Sorry, that I do not remember exactly but I think that this has changed and might be a hint to the kind of error produced by the former version.

I hope that this can be helpful. Sorry that I cannot be more pracise but I am neither a programer nor do I fully understand how Drupal works.

By the way: Could you give me an advise how I could find a Prupal Pro who might help me with some module adjustments and one extra little script for a community site for tutoring (from school to wind surfing lessons) with small budget for the beginning but quite a potential when it works? I'm just asking because there are very few Drupal experts around in Germany and I don't know how to get together with someone abroad.

Thanks
- hausig

pobster’s picture

Status: Active » Fixed

Thank you for replying, it does sound though my assumptions are correct regarding your html filters set up - I shouldn't have assumed that everybody has the same set up as me! :o) I am glad that your problem is now resolved and I think this correspondance has convinced me that maybe I should leave the validation how it currently is... I just thought it was a nice touch to be told that your code was invalid rather than just have it put straight into the database filtered through a Drupal format. Still it's apparently the way 'it should be done' so I should leave it alone now.

...You know I would be interested in having a German copy/ translation of my module emailed to me? I could then think about the possibility of providing translations within the package itself? That would be very helpful if you could, but please don't feel like you have to or anything!

As for your other question regarding getting a Drupal coder to help you, I think that you can make requests on this forum:

http://drupal.org/forum/51

Else, if it's only minor things you need doing then perhaps I could help? I certainly wouldn't require any form of payment either - I'm not interested in money for myself. If however anyone reading this does feel the need to reach into their pockets for whatever reason then my charity of choice is:

http://www.make-a-wish.org.uk/donate/

Thank you

Pobster

hausig’s picture

Thanks very much.

Concerning the translation of your module. Yes, I would send you a translation. But, since I am not familiar with the procedure: How can I send it to you? I used the locale module and translated all the pieces that a user is going to see (not yet the help text because it won't be public). Now, the translation is somewhere stored in some file but I have no clue how to separate and save the special translations for your module in order to email it to you.
So, if you could tell me exactly what I should do I send you the translation (including the translations of the help).

Concerning help for some minor issues: Thanks a lot for your offer. If I might need it later should I better contact you using the contact form or email?

One little question concerning your module: I still have no clue, how to use the table manager in my own php scripts if I want to put in dynamic data (for example an array pulled out of my own data base table) - so I still use the table filter module. The help files that come with it implies that someone is familiar with the Drupel structure in depth.
For example this help I don't understand:
"

...
$output .= tablemanager_display(4, 20);
...
print theme ('page', $output);

"
How does my script have to format $output? ( lets say I want to output the results of a mysql_query using the tablemanager_display?) And how could I use it without using this ...theme...?

pobster’s picture

Hey again!

Sorry about my slow reply, I haven't been around much the last couple of days. Okay to answer your questions:

Translations; I'd *really* appreciate you sending me your translation, but like yourself - I really don't have a clue regarding how they work and integrate within Drupal... I notice that a few other modules have folders named /po which appear to contain different languages and I assume that maybe the locale module just auto picks them up from those? I really don't know... If you want to just send me an email with all the translations then I'll see if I can work it out myself (either through Drupal or one of the feedback forms on any of my sites.)

Help; Yes, I'm always willing to help anyone who asks to the best of my abilities, but please remember that I'm not a programmer!!! If something sounds beyond me I *will* say so though and won't waste any of your time. I'm good like that see ;o)

Tablemanger with dynamic data; Ah yes... I guess that's not phrased well is it? Truth is that I never considered anyone doing what you need to do... I guess that's one of the things the tables module is fantastic for so I really shouldn't incorprate it into my own module (although I think it'd be a fairly easy patch!) There's rules about stealing other modules functionality and leaving them redundant... I guess though if you really absolutely did want to use tablemanager for this purpose you could always use the tablemanager and tablemanager_data databases for your own code. When you insert a new entry into the db it auto increments the table id and won't affect tablemanagers normal running.

Just to explain about that snippet I wrote, $output isn't necessary to the running of it - it's purely for displaying purposes so to clarify:

$output = "<p>This will display a table:</p>";
$output .= tablemanager_display(1, 35);
$output .="<p>This text will display below it</p>";
print $output;

Tablemanager returns a table rather than print it to the screen. Hence how comes you can do the above code and hence how comes on a single line you need to specify a print command: <?php print tablemanager_display(1, 35); ?>.

Pobster

pobster’s picture

Status: Fixed » Closed (fixed)