Activating page_title module results in me not being able to submit pages!

query: INSERT INTO page_title VALUES (13, 'page title')
error:

For some reason I get no error message!

Anyone got this working?

Comments

grabur’s picture

Location http://mydomain/?q=node/add/page
Referrer http://mydomain?q=node/add/page
Message Cannot modify header information - headers already sent by (output started at /home/skillslab/public_html/drupal-4.7.0/includes/database.mysql.inc:113) in /home/skillslab/public_html/drupal-4.7.0/includes/common.inc on line 266.
Severity error

ajk’s picture

Hi,

I have tried the page_title module using CVS/4.7 drupal version and a contrib module from CVS from DRUPAL-4-7 and it appears to work for me.

Try adding this to your .htaccess file in order to see the error message:-

php_value output_buffering = On

That will prevent the "headers already sent" from happening and at least you may get to see something more of what's going on to report back here.

regards
--AjK

grabur’s picture

That didn't work:

I used this instead:
php_value output_buffering 1
And I have no idea what it means.

But it supressed all errors.

The sql query appears to be working - populating the page_title table , but the errors remain if I remove the above from the .htaccess file.

Any ideas!

adnanshareef’s picture

I got through the same error. If I dont specify the page title, i only get one error (delete from query) and if I specify page title, I got two errors (delete and insert query)... Here is the error I see on the display..

query: DELETE FROM page_title WHERE nid = 19
error:

query: INSERT INTO page_title VALUES (19, 'Herbal Weight Loss')
error:

At first I thought that my db got corrupted. I ran exactly the same queries in phpmyadmin and they worked. I dropped the page_title table and created it again but no use..

ajk’s picture

my cvbs DRUPAL4-7-0 has page_title_nodeapi() in page_title uses db_queryd() instead of db_query()

Try altering those db_queryd() to db_query()

regards
--AjK

adnanshareef’s picture

Applied the recommended changes in page_title.module .. but same error..

I would also add tht steps i did in converting my site to 4.7

first, i disabled all additional modules and enabled the default them on my 4.6 installation
took the backup of db and create a new db and imported the backup into it
installed 4.7 files on another ip, connected it to the backup db and run the update script
when the site was up and runing with 4.7, i enabled the modules that i previously disabled. that includes image, adsense, page_title... rest are working fine except page_title.

thats all what i did

thanks
Adnan

ajk’s picture

I've looked long and hard at the code and can't see why these errors would be occurring. I could understand that the INSERT would fail if the DELETE previously failed as the nid is a primary key and you cannot have two records with the same primary key in the page_title database table.

What happens if you just try to delete a node (that just calls DELETE without an insert)?

I was going to raise an issue regarding the db_queryd() but someone else already did on issue 56852

Unrelated, I did find another bug regarding editing an existing value on the edit screen. I raised issue 62108 which contains a patch to fix the failure to load a node in the hook_form_alter() hook that page_title.module implements.

Regards
--AjK

adnanshareef’s picture

I just commented out the insert line in page_title_nodeapi. But it doesnt seem to work. Now, on both new node and update node, i see error on delete

query: DELETE FROM page_title WHERE nid = 1
error:

i can tell you the url and can apply any changes/patches you suggest.

thanks
Adnan

adnanshareef’s picture

I just downloaded the page_title module from drupal website (for 4.7) again and replaced the files on the server. Its just working fine now with no sql errors. I hope the issue is resolved for other people too..
thanks

Adnan Shareef