Hi All,
I am migrating from Drupal 6 to Drupal 7 and had a Java script related issue which got resolved .
Now i am able to see the pages without the error i used to see earlier. The screen shows the firebug view of the page post the dropdown change and javascript run. The Firebug shows the value of the project ID it acquired but the table shows blank.
This is the method in PHP and this is the table theme used for displaying the table seen in the screenshot.
All this was visible in Drupal 6 but i am unsure as to what additional changes need to be done for Drupal 7. This is the Javascript file used in the entire page for the functionality.
Would like to have your views as to what is missing in the Drupal 7 version of my customization.
Thanks
A
Comments
I cannot understand what the
I cannot understand what the problem is. Can you please try explaining it again?
Contact me to contract me for D7 -> D10/11 migrations.
Or anything really. I'm friendly, and open to work or conversation.
Hi Jay
I have a page where on change of the dropdown box, the table above it gets populated. So if i select a value "Draft" from the dropdown box, the javascript and jquery code works to obtain the list of projects in Draft state (via the web service calls) and the table renders the details obtained in three columns (Project ID, Project Description and Project Status).
This functionality used to run easily in Drupal 6 but in Drupal 7; there is a need of further tweaking. This is the main theme code
When i used Firebug on Drupal 7,the line of code using the link l() above is being seen code results in this.
The empty td and the link text for the href are resulting in a blank table :(
I am trying to investigate why Drupal 7 fires blanks at these areas where Drupal 6 prints out the values required.
I have stareted refering your link
But would like to have your inputs as to what more needs to be done in Drupal 7.
Thanks
It looks like you are
It looks like you are rendering the incorrect form elements, and since they are empty, you are ending up with an empty table.
Do this at the top of your theme function:
This will dump the $variables element to the screen, so you can see where the data is located. This should show you where you are going wrong in your theme function.
Contact me to contract me for D7 -> D10/11 migrations.
Or anything really. I'm friendly, and open to work or conversation.
I tried the debug and found
I tried the debug and found this output for the first two project ID's that got print
I tried with the following code hoping for some success appending the ['#value'] for the row elements to be displayed.But still no output.
Jay was that a valid attempt from the observation in the debug?
Thanks
Angela
In the form definition (which
In the form definition (which you haven't shown), it appears that you is no
#typefor some (or all - I didn't check) of the elements you are trying to render in the theme function. As such, Drupal has nothing to render, since it doesn't know what it's looking at.This says to me that you are doing one of two things. The first is that you are purposefully not setting the
#type, with the expectation that the value you set in#valuewill be printed to the screen. If this is the case, then you need to change#value(D6) to#markup(D7). The other possibility is that you have forgotten to set the#type, and in this case you will need to add the#typeto the elements in the form definition.Edit: You shouldn't be calling drupal_render on the #value of the form element, drupal_render() is meant to render entire form elements.
Contact me to contract me for D7 -> D10/11 migrations.
Or anything really. I'm friendly, and open to work or conversation.
Yes Jay, i think i am using
Yes Jay, i think i am NOT using the 'type'. The following is the form. The only types i am using is the select etc.
Jay should the markup in
Jay should the markup in place of values substitution be done inside the form or the theme ? I think we are close to the resolution would like to have your support :).(It is been quite a struggle with the D6 to D7 transition)
Thanks
Angela
Change this:<?php
Change this:
To this:
Contact me to contract me for D7 -> D10/11 migrations.
Or anything really. I'm friendly, and open to work or conversation.
Yes :)
Jay ..thank you sooo much. This was the required change!
Cheers
Glad to have helped!
Glad to have helped!
Contact me to contract me for D7 -> D10/11 migrations.
Or anything really. I'm friendly, and open to work or conversation.