Hi
Following a suggestion from a developer, I just added a PHP block to my site's default theme, and now the site cannot be accessed
Fatal error: Call to undefined function: stock_do_quote() in /home/canalpda/public_html/includes/common.inc(1342) : eval()'d code on line 2
I need to disable that new block so everything works again. How can I access the site admin, probably using another theme or no theme at all so the bad block is disabled?
I'm using Drupal 5.1
Thanks for any assistance.
---------------------------------------------------------------------- Albert
I am using the page template to create a home page and the content body is getting truncated with a "read more" button on it. Can I disable that without hacking code? Do I need to learn how to use Panels already?
Thanks, Steve
You can set the default teaser length under Admin/Content management/Post settings in the "length of trimmed posts" field or you can put <!--break--> at the the point in the content where you want the break to be (or at the end for no break. You don't have to get in to the code or template at all.
Or have you already set all that and it still isn't working?
On 5/18/07, Stephen Wills developer@blessedherbs.com wrote:
I am using the page template to create a home page and the content body is getting truncated with a "read more" button on it. Can I disable that without hacking code? Do I need to learn how to use Panels already?
Thanks, Steve -- [ Drupal support list | http://lists.drupal.org/ ]
Quoting Stephen Wills developer@blessedherbs.com:
I am using the page template to create a home page and the content body is getting truncated with a "read more" button on it. Can I disable that without hacking code? Do I need to learn how to use Panels already?
Go to http: //drupal5.sample.org/admin/content/node-settings (Administer->Content management->Post settings) and change the "Length of trimmed posts" setting to 0. You will need to edit and save any previously modified pages. We need to think about moving this control to per content type. Then Page could always be 0 while Story would be trimmed.
Alternately you can insert <!--break--> at the end of the page to change per page where the post is trimmed. When at the bottom of the page, it will never be trimmed.
Earnie
I thing the better way, is to modify the block content inside the database record. I have this problem very often, and i use phpMyadmin to search for the record in plain text. Then i delete the content of the block (to not delete the record, but only the content).
Hope this will help.
Michel Lévy-Provencal
2007/5/18, Albert Cuesta acuesta@gmail.com:
Hi
Following a suggestion from a developer, I just added a PHP block to my site's default theme, and now the site cannot be accessed
Fatal error: Call to undefined function: stock_do_quote() in /home/canalpda/public_html/includes/common.inc(1342) : eval()'d code on line 2
I need to disable that new block so everything works again. How can I access the site admin, probably using another theme or no theme at all so the bad block is disabled?
I'm using Drupal 5.1
Thanks for any assistance.
Albert
[ Drupal support list | http://lists.drupal.org/ ]
Michel
I did as instructed and it worked. Many thanks! -- Albert
El 19/05/2007, a las 10:16, Michel Levy-Provençal escribió:
I thing the better way, is to modify the block content inside the database record. I have this problem very often, and i use phpMyadmin to search for the record in plain text. Then i delete the content of the block (to not delete the record, but only the content).
Hope this will help.
Michel Lévy-Provencal
2007/5/18, Albert Cuesta acuesta@gmail.com:
Hi
Following a suggestion from a developer, I just added a PHP block to my site's default theme, and now the site cannot be accessed
Fatal error: Call to undefined function: stock_do_quote() in /home/canalpda/public_html/includes/common.inc(1342) : eval()'d code on line 2
I need to disable that new block so everything works again. How can I access the site admin, probably using another theme or no theme at all so the bad block is disabled?
I'm using Drupal 5.1
Thanks for any assistance.
Albert
[ Drupal support list | http://lists.drupal.org/ ]
-- Michel Lévy-Provençal
+336 23 93 60 16 | mikiane.com
[ Drupal support list | http://lists.drupal.org/ ]
Albert Cuesta schrieb:
Michel
I did as instructed and it worked. Many thanks!
There is an easier way to do this: create an extra directory within [your-drupal-inst/includes]. Lets call it "custom". Then create a new php-file called "my-custom-block.php". Create a new block, set the input type to "php" and insert the following code as content: <code> <?php require_once(dirname(__FILE__).'/includes/custom/my-custom-block.php'); ?> </code>
Now you can modify the new php-file and if there is an error its easy to edit this file without modifying any database record.
hth,
Stefan
On Saturday May 19 2007 6:13 am, Stefan Borchert wrote:
Albert Cuesta schrieb:
Michel
I did as instructed and it worked. Many thanks!
There is an easier way to do this: create an extra directory within [your-drupal-inst/includes]. Lets call it "custom". Then create a new php-file called "my-custom-block.php". Create a new block, set the input type to "php" and insert the following code as content:
<code> <?php require_once(dirname(__FILE__).'/includes/custom/my-custom-block.php'); ?> </code>
Now you can modify the new php-file and if there is an error its easy to edit this file without modifying any database record.
hth,
Stefan
Actually, if you have a properly constructed module (which is a PHP file and a couple of supporting files), you can just call the function. And if you are doing different custom code things in different places, you can create your various functions in the one file and call them as necessary in blocks, nodes or whatever, like so:
<?php show_me_the_money(); ?>