Drupal 7.23 When I open page (as anonymous user), I periodically get warning and error messages. The duplicate of header logo appears in the end of page, right above error messages.
I can't understand conditions when appears this warning & error, but it seems it appears when I open page as anonymous user. Then after logging in, logging out, no any errors shown anymore.
warning:
Warning: Cannot modify header information - headers already sent by
(output started at
/home/ztiw7851207/public_html/includes/common.inc:2700) in
drupal_send_headers() (line 1220 of
/home/ztiw7851207/public_html/includes/bootstrap.inc).
Warning: Cannot modify header information - headers already sent by
(output started at
/home/ztiw7851207/public_html/includes/common.inc:2700) in
drupal_send_headers() (line 1216 of
/home/ztiw7851207/public_html/includes/bootstrap.inc).
error:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062
Duplicate entry '' for key 'title': INSERT INTO {aggregator_feed}
(fid, url, link, description, image, hash, etag, modified) VALUES
(:db_insert_placeholder_0, :db_insert_placeholder_1,
:db_insert_placeholder_2, :db_insert_placeholder_3,
:db_insert_placeholder_4, :db_insert_placeholder_5,
:db_insert_placeholder_6, :db_insert_placeholder_7); Array (
[:db_insert_placeholder_0] => 9 [:db_insert_placeholder_1] =>
http://hitech.com/rss/reviews/ [:db_insert_placeholder_2] =>
http://hitech.com/reviews/ [:db_insert_placeholder_3] => News, reviews
and opinion outlet with obsessive coverage of cutting edge gadgets,
consumer electronics and the science and technology they're built
upon. [:db_insert_placeholder_4] =>
http://hitech.com/img/rss_cover.png [:db_insert_placeholder_5] =>
1d37c01e3b1346cc3ac3dbf1280c3fd236c3f3433e1d44a4902066a9f3d87cbe
[:db_insert_placeholder_6] => [:db_insert_placeholder_7] => 0 ) in
aggregator_refresh() (line 640 of
/home/ztiw7851207/public_html/modules/aggregator/aggregator.module).
How to solve this issues?
Issue may be due to the aggregator_feed module try to uninstall and re install it, if you are using Drush
drush dis aggregator_feed && drush en aggregator_feed
Related
The company I work for are using Customer Area for one of our clients and everything has been great until recently. When a private file is tried to be downloaded we get several error messages appear:
Notice: Undefined index: force-download in /Users/mathew/Websites/mamp/portal-test/wp-content/plugins/customer-area/src/php/core-addons/private-file/private-file-addon.class.php on line 1029
Warning: Cannot modify header information - headers already sent by (output started at /Users/mathew/Websites/mamp/portal-test/wp-content/plugins/customer-area/src/php/core-addons/private-file/private-file-addon.class.php:1029) in /Users/mathew/Websites/mamp/portal-test/wp-content/plugins/customer-area/src/php/core-addons/private-file/private-file-default-handlers.class.php on line 945
Warning: Cannot modify header information - headers already sent by (output started at /Users/mathew/Websites/mamp/portal-test/wp-content/plugins/customer-area/src/php/core-addons/private-file/private-file-addon.class.php:1029) in /Users/mathew/Websites/mamp/portal-test/wp-content/plugins/customer-area/src/php/core-addons/private-file/private-file-default-handlers.class.php on line 952
Warning: Cannot modify header information - headers already sent by (output started at /Users/mathew/Websites/mamp/portal-test/wp-content/plugins/customer-area/src/php/core-addons/private-file/private-file-addon.class.php:1029) in /Users/mathew/Websites/mamp/portal-test/wp-content/plugins/customer-area/src/php/core-addons/private-file/private-file-default-handlers.class.php on line 955
Warning: Cannot modify header information - headers already sent by (output started at /Users/mathew/Websites/mamp/portal-test/wp-content/plugins/customer-area/src/php/core-addons/private-file/private-file-addon.class.php:1029) in /Users/mathew/Websites/mamp/portal-test/wp-content/plugins/customer-area/src/php/core-addons/private-file/private-file-default-handlers.class.php on line 956
Warning: Cannot modify header information - headers already sent by (output started at /Users/mathew/Websites/mamp/portal-test/wp-content/plugins/customer-area/src/php/core-addons/private-file/private-file-addon.class.php:1029) in /Users/mathew/Websites/mamp/portal-test/wp-content/plugins/customer-area/src/php/core-addons/private-file/private-file-default-handlers.class.php on line 959
Warning: Cannot modify header information - headers already sent by (output started at /Users/mathew/Websites/mamp/portal-test/wp-content/plugins/customer-area/src/php/core-addons/private-file/private-file-addon.class.php:1029) in /Users/mathew/Websites/mamp/portal-test/wp-content/plugins/customer-area/src/php/core-addons/private-file/private-file-default-handlers.class.php on line 960
Warning: Cannot modify header information - headers already sent by (output started at /Users/mathew/Websites/mamp/portal-test/wp-content/plugins/customer-area/src/php/core-addons/private-file/private-file-addon.class.php:1029) in /Users/mathew/Websites/mamp/portal-test/wp-content/plugins/customer-area/src/php/core-addons/private-file/private-file-default-handlers.class.php on line 961
Warning: Cannot modify header information - headers already sent by (output started at /Users/mathew/Websites/mamp/portal-test/wp-content/plugins/customer-area/src/php/core-addons/private-file/private-file-addon.class.php:1029) in /Users/mathew/Websites/mamp/portal-test/wp-content/plugins/customer-area/src/php/core-addons/private-file/private-file-default-handlers.class.php on line 989
When trying to reset the plugin settings or database through the plugin we also get the error:
Notice: Undefined index: cuar_admin_theme_url in /Users/mathew/Websites/mamp/portal-test/wp-content/plugins/customer-area/src/php/core-classes/settings.class.php on line 674
Warning: Cannot modify header information - headers already sent by (output started at /Users/mathew/Websites/mamp/portal-test/wp-content/plugins/customer-area/src/php/core-classes/settings.class.php:674) in /Users/mathew/Websites/mamp/portal-test/wp-includes/pluggable.php on line 1216
We are using our own WordPress theme which we have removed all customised WP Customer Area templates, and even switched themes to TwentySeventeen but the errors still appear. As well as switching themes we have tried uninstalling and reinstalling the plugin.
So we decided to create a new blank WordPress environment and test it there and re-download the plugin so it is new. The download button then began to work but when testing for a second/third time the errors returned.
As previously mentioned the plugin was working perfectly up until being discovered yesterday. We haven’t edited any of the core files only the template files which we did by following the instructions of WP Customer Area. The site is running WordPress 4.9.1 and plugin version is 7.4.5. However, we have tried with Wordpress 4.9 and plugin versions 7.4.0, 7.3.0.
If anyone can help with this it would be greatly appreciated. Thank you for taking the time to read my message.
Thanks
I got in touch with the people at WP Customer Area and they are looking into the issue as it seems to be a bug in the plugin. But in the meantime they have given me some code to stop the errors by replacing:
!isset($_GET['force-download']) && $_GET['force-download'] != 1)
On line 1029 in customer-area/src/php/core-addons/private-file/private-file-addon.class.php.
with the line:
if ( !isset($_GET['force-download']) || (isset($_GET['force-download']) && $_GET['force-download'] !== 1))
This has helped me with the errors and hope it helps you guys as well.
Unfortunately you will probably need to chase this bug through a lot of code, but the general fix is to identify situations where an array key is assumed to be existing and fix it with some code.
The error tells you where to start:
Notice: Undefined index: force-download in /Users/mathew/Websites/mamp/portal-test/wp-content/plugins/customer-area/src/php/core-addons/private-file/private-file-addon.class.php on line 1029
From the index name, force-download I would guess this is the value of a checkbox on an HTML form. When unchecked, no value is passed via HTTP POST yet the script is looking for this in $_POST (guessing here).
The best advice I can give is to fix the instances of this with something like:
<?PHP
if( array_key_exists( 'force-download', $_POST ) && $_POST['force-download'] )
{
// do something
}
?>
What I do for my forms:
In order to always have a $_POST value, I output a hidden form field with a zero value before the checkbox field. Then the checkbox field has a value of 1. That way the checkbox field, if checked, passes '1' via $_POST and my if statements just work without having to always be constantly be checking for empty, array_key_exists, etc.
Not sure when this occurred but when editing a category, this error is given at the top of the edit category page.
Warning: call_user_func_array() expects parameter 1 to be a valid
callback, function 'my_category_custom_fields' not found or invalid
function name in /home2/sirenon2/public_html/wp-includes/plugin.php on
line 525
Line 525 is call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args']));
When I submit on the edit category page, it gives me the original error plus:
Warning: Cannot modify header information - headers already sent by
(output started at
/home2/sirenon2/public_html/wp-includes/plugin.php:525) in
/home2/sirenon2/public_html/wp-includes/pluggable.php on line 1228
Line 1228 is header("Location: $location", true, $status);.
Any ideas on what the problem is and how to fix it? I do have custom fields on my edit category pages.
Thanks
Either one of installed plugins has error which is throwing above error or you need to update wordpress or PHP. There may be compatibility issue of WordPress with installed PHP version. Few of WordPress's functions might have been updated.
If updating doesn't works, simply go to wp-config.php file and set this constant to false. If this line is not there into config file, add it.
define('WP_DEBUG', false);
I also have this problem before. But I change output_buffering to On. You can find it from PHP.ini.
Or refer this url http://chevronscode.com/index.php/wordpress-header-error-wp-includespluggable-php.html
my moodle site display 'error reading from database'
after activating debugging in config.php error showed that table with name 'mdl_session'
not exist in database
the error message is:
Debug info: Table 'mniknami_edu.mdl_sessions' doesn't exist
SELECT id, sid, state, userid, lastip, timecreated, timemodified FROM mdl_sessions WHERE sid = ?
[array (
0 => 'lhdasq4iscedtqhvbs5j1lq833',
)]
Error code: dmlreadexception
Stack trace:
line 441 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 996 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 1415 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
line 1387 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
line 1366 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
line 268 of /lib/classes/session/manager.php: call to moodle_database->get_record()
line 79 of /lib/classes/session/manager.php: call to core\session\manager::initialise_user_session()
line 806 of /lib/setup.php: call to core\session\manager::start()
line 35 of /config.php: call to require_once()
line 27 of /login/index.php: call to require()
my moodle work correctly 2 days ago and Since then, I did not make any changes or update to it
why this problem arise and how i can fixed it?
my moodle version is 2.6.1+
Moodle sessions can be stored in differents places : database, files, memcached. According to https://docs.moodle.org/en/Session_handling the "[files] driver is used by default in new installation".
Perhaps that was the case, but something was recently changed in config.php and Moodle is now trying to use the database for sessions?
On a sidenote, using memcached for session makes a huge difference in performance (as said on Moodle's wiki), but the configuration needs to be done in config.php. If you have memcached available, this could fix the problem and make your site faster.
I ran into the same issue. Check if you are running out of free space in your partitions. If so give it some more space or clean up unused files etc. Turn off binary logs in mysql if you can, those can get really big.
I am on Magento ver. 1.7.0.0 and I can't edit some of the products from the admin backend.
When I tried to change the product description directly using mysql it worked, so then I tried removing parts of the description and then found that
everything till the text 'printer driver lets users transfer data' works but when I added the word 'from' to it ,it didn't work making the paragraph end in 'printer driver lets users transfer data from' did nothing ,neither showed a error nor a successful message it just refreshed the page. It can't be about the length because if I replace the text from to krom it works.
So I tried editing the description to just 'printer driver lets users transfer data from' it worked
From the system.log:
ERR (3): Warning: array_key_exists() expects parameter 2 to be array, null given in //app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php on line 507
ERR (3): Recoverable >>ERRor: Argument 1 passed to Varien_Object::addData() must be an array, null given, called in //app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php on line 514 and defined in //lib/Varien/Object.php on line 243
ERR (3): Warning: Invalid argument supplied for foreach() in //lib/Varien/Object.php on line 245
The Chrome console tells me :
index.php/admin/catalog_product/validate/id/1/back/edi…roduct_info_tabs_group_7/key/978d8fe4570a41312a7520945e982662/?isAjax=true 500 (Internal Server Error) prototype.js:1530
Ajax.Request.Class.create.request prototype.js:1530
Ajax.Request.addMethods.initialize loader.js:61
(anonymous function) prototype.js:429
klass prototype.js:101
varienForm._validate form.js:80
varienForm.submit form.js:65
saveAndContinueEdit /index.php/admin/catalog_product/edit/id/1/back/edit/tab/product_info_tabs_group_7/key/a325cea2187bfa32cec5c6d0c14e0baa/:2240
onclick
A little PHP debugging tells me that for the product with description error
$product->getAttributes(); was empty but for the working products it was an array.
$attributes = $product->getAttributes();
around line 504 of app\code\core\Mage\Adminhtml\controllers\Catalog\ProductController.php
If I change the following part from the form.js there is no Chrome console error but it still doesn't work:
this.submitUrl = url;
if(this.validator && this.validator.validate()){
if(this.validationUrl){
this._validate();
}
else{
this._submit(); // I removed everything but this
}
return true;
}
If it helps there are 5881 characters before the word 'from' in the description.
I have tried editing in all major browser so there are no compatibility issues.
I believe the problem is somewhere in the javascript but can't find where. Even if I can just remove the validation script from the admin forms I will but I don't think I should and I don't know how.
Any help would be greatly appreciated.
Thanks for your time.
Take a closer look at your .htaccess file. When I migrated my 1.7.0 Magento store to another server I included the .htaccess file from the old server and then the message: "Invalid Form Key. Please refresh the page" popped on screen and nothing happened, not even the configuration changes had effect.
The solution was to install a fresh Magento and then copy the My Store files the the Magento root, excluding .htaccess. When I used the .htaccess from the fresh installation, everything started to work fine. I don't know what exactly happened, maybe each server structure has different and particular .htaccess entries and rules. It works to me.
I get the following error when viewing my home page for my CakePHP website:
Warning (512): DbAcl::check() - Failed ARO/ACO node lookup in permissions check. Node references:
Aro: Array
(
[User] => Array
(
[id] => 1
[username] => admin#test.com
[group_id] => 1
[created] => 2008-07-05 17:16:58
[modified] => 2008-07-05 17:16:58
)
)
Aco: controllers/Pages/display [CORE/cake/libs/controller/components/acl.php, line 273]
Warning (2): Cannot modify header information - headers already sent by (output started at /Users/cameron/Sites/cakeapp/cake/libs/debugger.php:673) [CORE/cake/libs/controller/controller.php, line 742]
What is the problem(s)? Thanks
First, did you create the ACO/ACL tables in the database. (usually in /config/sql). Next, your user probably needs the ACO/ACL foreign keys, so you'll probably have to modify your user table.
see this tutorial for more information:
http://lemoncake.wordpress.com/category/authorization/
I recall getting errors like this, but unfortunately can't remember specific solutions. It came down to perseverance and tweaking. Try debug() on everything you can think of and you'll begin to get the picture.
If you followed the tutorial I posted earlier, start it again, double checking everything. It isn't a straightforward component/behaviour but Mark documents it well.
Stick with it!