Hello,
First thank you for a great module.
Anyway on Drupal 6.8, when you try to create a chart node, all you got a blank page and drupal throws this error when back:
warning: include_once(settings.inc) [function.include-once]: failed to open stream: No such file or directory in /var/www/html/sites/all/modules/fusioncharts/fusioncharts_node/fusioncharts_node.module on line 156.
I copied the settings.inc to "fusioncarts_node" folder just to try and then create/edit page came, but new errors introduced when I tried to publish something:
* warning: sort() expects parameter 1 to be array, null given in /var/www/html/sites/all/modules/fusioncharts/fusioncharts.module on line 55.
* warning: htmlentities() expects parameter 1 to be string, array given in /var/www/html/sites/all/modules/fusioncharts/fusioncharts.module on line 67.
* warning: htmlentities() expects parameter 1 to be string, array given in /var/www/html/sites/all/modules/fusioncharts/fusioncharts.module on line 67.
* warning: htmlentities() expects parameter 1 to be string, array given in /var/www/html/sites/all/modules/fusioncharts/fusioncharts.module on line 67.
* warning: htmlentities() expects parameter 1 to be string, array given in /var/www/html/sites/all/modules/fusioncharts/fusioncharts.module on line 67.
* warning: htmlentities() expects parameter 1 to be string, array given in /var/www/html/sites/all/modules/fusioncharts/fusioncharts.module on line 67.
* warning: htmlentities() expects parameter 1 to be string, array given in /var/www/html/sites/all/modules/fusioncharts/fusioncharts.module on line 67.
* warning: htmlentities() expects parameter 1 to be string, array given in /var/www/html/sites/all/modules/fusioncharts/fusioncharts.module on line 67.
* warning: htmlentities() expects parameter 1 to be string, array given in /var/www/html/sites/all/modules/fusioncharts/fusioncharts.module on line 67.
* warning: htmlentities() expects parameter 1 to be string, array given in /var/www/html/sites/all/modules/fusioncharts/fusioncharts.module on line 67.
* warning: htmlentities() expects parameter 1 to be string, array given in /var/www/html/sites/all/modules/fusioncharts/fusioncharts.module on line 67.
* warning: htmlentities() expects parameter 1 to be string, array given in /var/www/html/sites/all/modules/fusioncharts/fusioncharts.module on line 67.
* warning: Invalid argument supplied for foreach() in /var/www/html/beta.thgtr.com/sites/all/modules/fusioncharts/fusioncharts.module on line 230.We are using Views 2 but these errors occur when trying to create a chart node, not a view, but I am not sure if there is a connection.
May there be drupal_get_path and variable issues somewhere?
Thanks in advance.
Comments
Comment #1
chawl commentedOops, I tried to mask the original path when posting for security, but unfortunately I have missed tha last one, no confusion please, all paths are same on all errors in fact :/
Comment #2
chawl commentedNewly, I tried to uninstall/reinstall FC and I enabled all FC modules except webforms. Then I discovered that no fusioncharts related SQL tables are created during module enable also.
I also tried to install on a sandbox account on DrupalValueHosting (Drupal 6.6) other than our server, but no success again. When I tried to create a chart node, I got this time not a blank; but a page with a single error line:
Though Fusion Charts Demos are working properly on both servers.
Comment #3
freshaspect commentedI fixed this by correcting the path to settings.inc.
In fusioncharts_node.module I changed line 156 to:
include_once(drupal_get_path ( 'module', 'fusioncharts' ).'/settings.inc');
.. all seems to work fine after this.
Pau
Comment #4
chawl commentedThanks, yes path problem goes away by this hack, but second problem persists.
I searched all install procedures (root and FCnode dir) and have not seen any SQL related CREATEs or something, and checked old versions of the code and find one eventually on one of the 5.x-dev packages, perhaps the initial release.
I copied the CREATESs with a little hope to 6.x-dev module.install and reinstalled again, this time I had the table with the name "fusioncharts" in place. But when I tried to create a node, module complained again and said that table "fusioncharts_node" was not present. I changed the name of the table to match the error with a little hope again but no way. Only table error disappeared but second long error in msg #1 have persisted.
I am not sure why there are no table creates anywhere in 6.x-dev.
Do we need an upgrade path from somewhere, D5+F5 -> D6+FC6 or something?
Thank you in advance.
Comment #5
jivmuk commentedIndeed this fixed the error in my case to. Thanks Pau. Although I do have a new warning message "warning: array_unshift() [function.array-unshift]:" does any of you see this...
Jiv
Comment #6
jivmuk commentedFor some reason I am not able to select "Type of Chart" to create the node. The pull down list box does not have any value in it. Also it shows a warning,
* warning: array_unshift() [function.array-unshift]: The first argument should be an array in ...sites\all\modules\fusioncharts\fusioncharts_node\fusioncharts_node.module on line 76.
* warning: Invalid argument supplied for foreach() in ...\includes\form.inc on line 1416.
Any help would greatful!
Jivmuk
Comment #7
aaron1234nz commentedThanks Pau,
I missed changing one reference to settings.inc I've committed the fix now.
Comment #8
chawl commentedI tried zillion times to uninstall/reinstall FC previously but database tables had been created neither on D6.6 nor on D6.8, but after installing Schema API, FC installed correctly for the first time.
Is there any dependency with Schema API module? May be something goes wrong with native Drupal 6.x schema or we may have our own problems with our Drupal installations.
Can anyone reproduce this?
Anyway I got my first chart, but there are many JS errors together with the secondary long error in #1. If I can decode the chaotic behaviour (esp.FC node), I plan to file them under a seperate issue.
Thanks for a great module by the way.
Comment #9
aaron1234nz commentedHi Chawl,
There is no dependency on Schema API. I had an couple of typos in the the install file which prevented the module from creating tables. I have fixed this now. There is currently some weird AHAH javascript errors going on with fusioncharts nodes. I spent several hours trying to narrow it down but to no avail (yet).
Comment #10
chawl commentedThank you for your efforts aaron, I am experimenting with the new dev version now.
By the way, does the module handle multibyte UTF-8 characters correctly? Seems not.
Somebody says something like Writer writer = new OutputStreamWriter(outs, "UTF-8"); on FCF forum :S
May it be easy!
Comment #11
chawl commentedComment #12
chawl commentedOk, just a note.
When I try to add a CCK field, configuration page complains with the following error:
And I know there is an API but err.. any plans for a [fusion:node=1] or something :)
Tx.
Comment #13
chawl commentedHello, I want to share initial results with the new dev on Drupal 6.8. I reinstalled module from scratch as Drupal complained that fusioncharts_cck_fields table is not present. After uninstall/reinstall, this error has gone.
CCK:
When you create a cck field configuration page comes ok but following error is introduced:
Then when you save the conf, D says:
but saves successfully
When you create a node type with this CCK field included, no chart is shown. Neither for preview, nor after saving. No errors shown also. Then when you edit the same node, you see that the FC data grid loses its values. Refill and resave does nothing again.
FC Node:
Partially good news now :)
When you create a native FC node without changing chart type, your chart is created succesfully, no problems. You have a very nice Column 3D bar chart with labels, everything is intact.
If you try to change the chart type from dropdown field, first an alert window says:
then second time you select, type is selected correctly and when you save you get your new type of chart. Also if you select a previously selected chart type again, alert window does not appear, everything works as expected. When you save you have your chart with the new type.
Big problem is if you want to preview the node. If you press preview you get:
with no chart preview, but data is intact on the grid. If you save the node all you got a chart with "no labels" on it, just floating bars. Do whatever you want, edit, change values, add rows; all you get is a "not labeled" chart with bars only. You have to delete and create a new FC node and avoid "preview" this time :S
Chaos:
Sometimes when you try to change the type on FC node, another data input grid appears under somewhere on edit page with the same input data on it. May be some hidden form values are exposed erroneously when JS callbacks server, or data grid field is attached twice somehow after type change. Eventually this error seems chaotic, it seems to appear randomly. By the way I am using FireFox 3.0.5.
UTF-8
Labels can have UTF-8 characters now, thanks for fixing :)
This is my test. All errors can be specific to our setup, but I hope this helps.
Thank you for your efforts.
Comment #14
chawl commentedComment #15
chawl commentedMinor update.
Multiseries charts saves successfully but if you try to edit, they lose all additional columns except the first two. Also if you add columns, row orders change from "Label 1 2 .." to "1 2 3..". But first row retains its label functionality.
When first creating a node, if you input values and missed something required on the node edit form then you save, you lose all your input when page refreshes and warns you about the missing field (e.g. Title).
Tx.
Comment #16
aaron1234nz commentedthanks chwl for pointing out those issues. CCK (and views) is very much still in development and currently does not work (as stated on the front page of this project). I need to do things that CCK and Views were not built to do which just adds to the challanges!
I'm glad the UTF-8 issue is solved (I took a guess with the code)
I'm still really confused with the HTTP error 0 thing. I get this error too, however I haven't managed to find the issue yet. Everything works fine individually, but fails together. I also have the same code in the CCK part and it works fine.
Comment #17
chawl commentedOk, first reproduce the HTTP 0 and double data grid problem then I will propose a fix at the end:
Create a FC node -> Change chart type to X -> Get your http error 0 press OK -> Chart type didn't changed yet, select type X again -> Refresh page (F5) -> Say OK to resend form values.
Voila, you will have another data grid somewhere under the node form and this is the main grid from now on. Fill two grids, save node, and chart results will be the one's under.
Let's come to JS, by the way there is no id named "#edit-major-type" in D6.8 or any other modules that we have.
So this call in fusioncharts.js is not functioning I am afraid.
And the big news comes last, for "An HTTP error 0 occured" and "double data grid" problem:
Change fusioncharts.js line #7 from
to
Somehow JS's euphoria causes trample damage but a sedative pill soothes I think :P
I always write things as a whole for clarity because I am not a coder. I can not be sure where to focus in fact, sorry for long posts then.
Hope this helps.
Tx.
Comment #18
chawl commentedHi again, on CCK side, I discovered something that I am not sure if this is a FC CCK or core CCK (6.x-2.x-dev) issue but will write down anyway.
When trying to asign an existing FC CCK field to a node type, following error comes:
In fact this is because of passing "no" extra column info to core CCK module that breaks the following query on /sites/all/modules/cck/includes/content.admin.inc on line #1510.
Though CCK creates "content_field_fusion" table (I gave the name 'fusion' to field), the above query fails because of the "vid,nid," trailing comma (,) problem as no column info is passed to the imploder. "fusioncharts_cck_fields" table is present and intact also with all necessary data in it.
phpMyAdmin reports for corresponding line on table "content_node_field":
and some attempts of my data input on content_node_field_instance as:
As I can see from a:0:{} for "db_columns" column on "content_node_field", there is no column value for FC.
I am not sure if this is a FC CCK or core CCK or a local issue by the way.
Thank you.
Comment #19
aaron1234nz commentedThanks for post #17. I thought I had removed the offending part of fusioncharts.js already (A hang over from D5), but obviously I had not. Thanks for finding it for me ;-) sometimes I fresh pair of eyes helps.
Comment #20
chawl commentedAha, then I have broken the broken part. If I break smt, I will post here again :) You're welcome.
I expect good news for CCK also, and err.. a filter to put charts in node bodies will be amazing (like image_assist). Same chart could be used multiple times with this and updates would be a child's play. This will be a revolution in charts history :P
I think Views->Block-in-node and/or Panels workaround is serpentine, and CCK is too much node centric.
I try to sound you out on this before a feature request by the way :)
Tx.
Comment #21
chawl commentedHi again,
fusioncharts.module line #68
gives the
error when one tries to preview the FC node.
After changing the line to this (
,the error disappears. (See *edit, above is nonsense)
Albeit preview shows no chart at all.
Tx.
*edit: Oops, $value comes as an array itself as warning says. I monkeyed with smt like this:
Then I am lost :/
Comment #22
aaron1234nz commentedI'm gonna close this thread because it getting very hard to follow. I think I've dealt with everything in this issue. It is better to file one bug per issue.