Hi,
We upgraded our site from D6 to d7. There is a major problem. The body of nodes is not visible in full node. What has happened is that 'Text Format field on each node is deselect and there is a drop down menu to select from plain or full. We have 1000s of node, we can't do it manually. Is there any way to force set the Text Format to Full Format?
Thanks alot.
Swapnil
Hi Swapnil,
Not sure I totally understand your situation, and proceed with caution always having a backup of code and database.
In Drupal 6 the input format was set per node at (table.field): node_revisions.format
In Drupal 7, the input format is set per field. The format for the body field is at (table.field) field_data_body.body_format
In D6, there was an integer associated with each input format (e.g. "3" was "Full Html").
In D7, it is a string. Full HTML is "full_html". So, via SQL directly on the database you could do something like:
UPDATE field_data_body SET body_format = 'full_html';
This is totally untested. This would change every instance of a body field on the whole site. To limit the changes to specific nodes you would add a "WHERE" clause at the end. Also remember that full_html has security implications if users have editing privileges.
Also note that I'm not sure what the cause of your problem is and it's always better to go to a fix when you understand the cause.
Good luck and report back,
Shai
On Wed, Jan 4, 2012 at 3:11 PM, Swapnil Bhartiya <swapnil.bhartiya@gmail.com
wrote:
Hi,
We upgraded our site from D6 to d7. There is a major problem. The body of nodes is not visible in full node. What has happened is that 'Text Format field on each node is deselect and there is a drop down menu to select from plain or full. We have 1000s of node, we can't do it manually. Is there any way to force set the Text Format to Full Format?
Thanks alot.
Swapnil
[ Drupal support list | http://lists.drupal.org/ ]
On 01/04/2012 09:41 PM, Shai Gluskin wrote:
Hi Swapnil,
Not sure I totally understand your situation, and proceed with caution always having a backup of code and database.
In Drupal 6 the input format was set per node at (table.field): node_revisions.format
In Drupal 7, the input format is set per field. The format for the body field is at (table.field) field_data_body.body_format
In D6, there was an integer associated with each input format (e.g. "3" was "Full Html").
In D7, it is a string. Full HTML is "full_html". So, via SQL directly on the database you could do something like:
UPDATE field_data_body SET body_format = 'full_html';
I ran this and it executed the query for some 1300 nodes but I still cant see the content.
The site in question is kalkion.com.
I will appreciate your help in this matter.
Thanks
Swapnil
This is totally untested. This would change every instance of a body field on the whole site. To limit the changes to specific nodes you would add a "WHERE" clause at the end. Also remember that full_html has security implications if users have editing privileges.
Also note that I'm not sure what the cause of your problem is and it's always better to go to a fix when you understand the cause.
Good luck and report back,
Shai
On Wed, Jan 4, 2012 at 3:11 PM, Swapnil Bhartiya <swapnil.bhartiya@gmail.com mailto:swapnil.bhartiya@gmail.com> wrote:
Hi, We upgraded our site from D6 to d7. There is a major problem. The body of nodes is not visible in full node. What has happened is that 'Text Format field on each node is deselect and there is a drop down menu to select from plain or full. We have 1000s of node, we can't do it manually. Is there any way to force set the Text Format to Full Format? Thanks alot. Swapnil -- [ Drupal support list | http://lists.drupal.org/ ]
On 01/04/2012 09:41 PM, Shai Gluskin wrote:
Hi Swapnil,
Not sure I totally understand your situation, and proceed with caution always having a backup of code and database.
In Drupal 6 the input format was set per node at (table.field): node_revisions.format
In Drupal 7, the input format is set per field. The format for the body field is at (table.field) field_data_body.body_format
In D6, there was an integer associated with each input format (e.g. "3" was "Full Html").
In D7, it is a string. Full HTML is "full_html". So, via SQL directly on the database you could do something like:
UPDATE field_data_body SET body_format = 'full_html';
Hi sai,
I tried with the machine name of the full_format which is 2 and it worked
UPDATE field_data_body SET body_format = '2'
THANKS A LOT.
This is totally untested. This would change every instance of a body field on the whole site. To limit the changes to specific nodes you would add a "WHERE" clause at the end. Also remember that full_html has security implications if users have editing privileges.
Also note that I'm not sure what the cause of your problem is and it's always better to go to a fix when you understand the cause.
Good luck and report back,
Shai
On Wed, Jan 4, 2012 at 3:11 PM, Swapnil Bhartiya <swapnil.bhartiya@gmail.com mailto:swapnil.bhartiya@gmail.com> wrote:
Hi, We upgraded our site from D6 to d7. There is a major problem. The body of nodes is not visible in full node. What has happened is that 'Text Format field on each node is deselect and there is a drop down menu to select from plain or full. We have 1000s of node, we can't do it manually. Is there any way to force set the Text Format to Full Format? Thanks alot. Swapnil -- [ Drupal support list | http://lists.drupal.org/ ]
And you just opened your site up to hackers...
Nancy Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
From: Swapnil Bhartiya
I tried with the machine name of the full_format which is 2 and it worked
UPDATE field_data_body SET body_format = '2'
On 01/05/2012 01:04 AM, Ms. Nancy Wichmann wrote:
And you just opened your site up to hackers...
what do you advice?
Swapnil
/*Nancy*/ Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
------------------------------------------------------------------------ *From:* Swapnil Bhartiya I tried with the machine name of the full_format which is 2 and it worked UPDATE field_data_body SET body_format = '2'
Set pages to filtered html. Then set up roles that are allowed to use full_format and make that the default format for that role. Then give people you trust that role.
On Wed, Jan 4, 2012 at 7:07 PM, Swapnil Bhartiya <swapnil.bhartiya@gmail.com
wrote:
On 01/05/2012 01:04 AM, Ms. Nancy Wichmann wrote:
And you just opened your site up to hackers...
what do you advice?
Swapnil
/*Nancy*/ Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
*From:* Swapnil Bhartiya I tried with the machine name of the full_format which is 2 and it worked UPDATE field_data_body SET body_format = '2'-- [ Drupal support list | http://lists.drupal.org/ ]
On 01/05/2012 03:57 AM, Walt Daniels wrote:
Set pages to filtered html. Then set up roles that are allowed to use full_format and make that the default format for that role. Then give people you trust that role.
I have restricted the access to full format to trusted roles. Ran the 'security and review' and got this:
Untrusted users are not allowed to input dangerous HTML tags. Details Skip OK
Untrusted users do not have access to use the PHP input format. Details Skip OK
Only safe extensions are allowed for uploaded files and images. Details Skip
Is that OK?
Swapnil
On Wed, Jan 4, 2012 at 7:07 PM, Swapnil Bhartiya <swapnil.bhartiya@gmail.com mailto:swapnil.bhartiya@gmail.com> wrote:
On 01/05/2012 01:04 AM, Ms. Nancy Wichmann wrote: > And you just opened your site up to hackers... what do you advice? Swapnil > /*Nancy*/ > Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. > King, Jr. > > ------------------------------------------------------------------------ > *From:* Swapnil Bhartiya > > I tried with the machine name of the full_format which is 2 and it > worked > > UPDATE field_data_body SET body_format = '2' > > > -- [ Drupal support list | http://lists.drupal.org/ ]