[support] Drupal 6 --> 7 upgrade - rogue PHP code / delete via admin/content

Jamie Holly hovercrafter at earthlink.net
Fri Jan 17 17:27:07 UTC 2014


Option 1:

Disable the PHP filter module, find your node and delete it, then 
re-enable the module


Option 2:
If you got the nid for it, then the quick fix would be a couple of lines 
in your custom module:

function module_init() {
node_delete($nid);
}

Put that in your module (of course changing module to your mode name), 
load a page and then remove that function.

Option 3:
Find your node in your field_data_body table and change the input format 
to 1. That takes the PHP filter out of it. If you don't know the nid, 
you can search for all nodes with PHP code in them:

SELECT * FROM `field_data_body` WHERE `body_value` LIKE '%<?php%'

Jamie Holly
http://hollyit.net

On 1/17/2014 12:14 PM, Darrell Eifert wrote:
> Thanks to those who have responded. I added a module to D7 that allows 
> me to search by Title in the admin/content menu.  I am able to search 
> for and find the "Page Count" node that has the rogue PHP code, but 
> the result line under TITLE says "No content available." and does not 
> give me an edit / delete option.
> Best,
>
> Darrell Eifert
> Lane Memorial Library
> (603) 926-3368
> On 1/17/2014 11:17 AM, Metzler, David wrote:
>>
>> Also if you can find it from the admin/content menu there is a bulk 
>> delete "update option" there that should work for you.
>>
>> *From:*support-bounces at drupal.org [mailto:support-bounces at drupal.org] 
>> *On Behalf Of *Walt Daniels
>> *Sent:* Friday, January 17, 2014 8:09 AM
>> *To:* support at drupal.org
>> *Subject:* Re: [support] Drupal 6 --> 7 upgrade - rogue PHP code / 
>> delete page?
>>
>> The node numbers do not change if you use the upgrade process, so 
>> test going to /node/nnn on D7  side and see if you get the WSOD one.
>>
>> You may also be able to find it in the Content view, or perhaps via 
>> the url aliases.
>>
>> On Fri, Jan 17, 2014 at 10:34 AM, Darrell Eifert 
>> <deifert at hampton.lib.nh.us <mailto:deifert at hampton.lib.nh.us>> wrote:
>>
>> Hello all --
>>
>> I recently completed a test Drupal 6 to 7 upgrade on our library site,
>> and all seemed to be well except that our old cron job will not run --
>> it appears to die on a white screen with the words "Number of pages".  I
>> did some digging via drush cron, and discovered that a page I had built
>> in Drupal 6 with PHP code listing the total number of website pages
>> contained a PHP function referencing "db_result", which apparently is
>> not supported in Drupal 7.
>>
>> My problem now is that I cannot delete the 'rogue' page from Drupal 7.
>> I can find the page easily enough, but it displays only as white screen
>> with text and none of the usual edit / delete tabs.
>>
>> Is there a way to delete a Drupal node without actually landing on that
>> node?  (Note also that I have the node alias from the Drupal 6 install,
>> but do not know the node number of the page in D7.)
>>
>> Thanks in advance ...
>>
>> --
>> Best,
>>
>> Darrell Eifert
>> Lane Memorial Library
>> (603) 926-3368 <tel:%28603%29%20926-3368>
>>
>> --
>> [ Drupal support list | http://lists.drupal.org/ 
>> <http://lists.drupal.org/> ]
>>
>>
>>
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20140117/5e4249d0/attachment.html 


More information about the support mailing list