Donations

Help support Pro_News and become a member of our Sponsors Group
The tip jar is at PayPal, but does not require a PayPal account
User Info
Bienvenue Anonyme
Adhésion:
Dernier: Witewolf
Nouveau aujourd'hui: 0
Nouveau hier: 0
Tous: 151
Visiteurs en ligne:
Membres: 0
Visiteurs: 37
Bots: 3
Total: 40
Qui est Où:
Visiteurs:Support Forums
Pro News Articles
Pro News Articles
Support Forums
Nedlastninger
Support Forums
Pro News Articles
Support Forums
Pro News Articles
Support Forums
Support Forums
Pro News Articles
Downloads
Nedladdningar
Nedlastninger
Downloads
Pro News Articles
Downloads
Support Forums
Downloads
Support Forums
Pro News Articles
Nedlastninger
Pro News Articles
Support Forums
My Account
Support Forums
Support Forums
Pro News Articles
Pro News Articles
Support Forums
Nedlastninger
Pro News Articles
Support Forums
Pro News Articles
Pro News Articles
Pro News Articles
Bots:Google > Support Forums
Baidu > Support Forums
YANDEX > Nedladdningar
Admin en Ligne:
Pas d'Admin en ligne!
Database error when creating section
Aller à la page 1, 2 SuivanteDatabase error when creating section
Posté le: Tue Jul 19, 2011 6:21 am
Hello There,
I decided to uninstall current Pro News as I did not have many articles and install 3.3 - the latest version from your download. Everything seems to be working fine except I can't create a section. Every time I click submit, I got "A database error has occurred...
The webmaster has been notified of the error."
Can you give me some direction to correct the problem.
Thanks again!
heliown's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux,Apache/5.0/5.2/9..2

heliown- Sponsor

- Messages: 15
- Inscrit le: Feb 24, 2008
Re: Database error when creating section
Posté le: Tue Jul 19, 2011 1:07 pm
Sure! Leastways .. I hope so ![]()
Exactly which version is this? (Check via Admin > Modules > Pro_News > Edit.)
Also there should be a lot of relevant text on that error concerning the SQL call that failed. If not displayed there, please turn on at least Show Database Queries under Admin > System > Main Settings > Debug.
I'm not aware of a known problem, but what version did you uninstall? (There was an installer "trick" I did at one point to move the Default section from id=1 to id=0 - perhaps that got confused with an uninstall/ install... Either that or one of the config_custom parameters has get left set badly perhaps.)
A link to your site?
(BTW, in theory at least you can upgrade any version of Pro_News to a later one without uninstalling.)
layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1

layingback- Site Admin

- Messages: 1229
- Inscrit le: Mar 18, 2006
Re: Database error when creating section
Posté le: Wed Jul 20, 2011 5:28 am
Hi layingback. Here is the error I got when I tried to create a section: CMS Warning line 75: On /admin.php?op=Pro_News&mode=sec&do=save While executing query "INSERT INTO cms_pronews_sections VALUES(NULL, "Tourism", "Torism", "0", "2", "0", "2", "1", "1", "", "", "", "", "", "", "", "", "", "", "", "", "", "0", "0", "0", "0", "1", "0", "0")" the following error occured: Column count doesn't match value count at row 1 In: /home1/angkorth/public_html/modules/Pro_News/admin/admin_functions.php on line: 709
It is 3.3.2.6. My website is www.angkorthom.us and my prior pro news version is 3.2.2.1. I tried to re-upload the admin_functions.php again but still have the same problem.
Thank you so much!
heliown's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux,Apache/5.0/5.2/9..2

heliown- Sponsor

- Messages: 15
- Inscrit le: Feb 24, 2008
Re: Database error when creating section
Posté le: Wed Jul 20, 2011 6:37 am
Looks like my bug
If you are comfortable using phpMyAdmin to add a field, then you could just add the following field to the (end of) pronews_sections:
Field: keyusrfld
Type: int(11)
Null: No
Default: 0
Otherwise uninstall (again) - sorry - and make the following change to /modules/Pro_News/cpg_inst.php before re-installing. Find around line 80:
secdsplyby tinyint(11) NOT NULL default '0',
PRIMARY KEY (id)", 'pronews_sections');
and replace with:
secdsplyby tinyint(11) NOT NULL default '0',
keyusrfld int(11) NOT NULL default '0',
PRIMARY KEY (id)", 'pronews_sections');
I forgot to add the new field into the fresh install section, although it was there in the upgrade part. I guess you must be the first fresh install since 3.2.2.4 was released!
layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1
Dernière édition par layingback le Thu Jul 21, 2011 6:25 am; édité 1 fois

layingback- Site Admin

- Messages: 1229
- Inscrit le: Mar 18, 2006
Re: Database error when creating section
Posté le: Thu Jul 21, 2011 5:02 am
There is a missing apostrophe before 0 in the second line so I added an apostrophe. But still I got this error now when trying to reinstall:
CMS Warning line 75: On /admin.php?op=modules&install=Pro_News While executing query "CREATE TABLE cms_pronews_cats ( id int(11) NOT NULL auto_increment, sid tinyint(11) default '0', title varchar(255) NOT NULL default 'New Cat', description varchar(255) default NULL, icon varchar(255) NULL default 'clearpixel.gif', view tinyint(11) NOT NULL default '0', admin tinyint(11) NOT NULL default '2', sequence tinyint(11) NOT NULL default '0', forum_id int(10) NULL, forum_module int(11) NOT NULL default 0, forumspro_name varchar(20) default NULL, PRIMARY KEY (id)) TYPE=MyISAM DEFAULT CHARSET=utf8" the following error occured: Table 'cms_pronews_cats' already exists In: /home1/angkorth/public_html/includes/classes/installer.php on line: 61
heliown's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux,Apache/5.0/5.2/9..2

heliown- Sponsor

- Messages: 15
- Inscrit le: Feb 24, 2008
Re: Database error when creating section
Posté le: Thu Jul 21, 2011 6:24 am
Thanks for pointing out typo (now corrected).
That's because of the failed install. Easiest if probably to use phpMyAdmin and delete and of the following which are present:
cms_pronews_articles
cms_pronews_blocks
cms_pronews_cats
cms_pronews_schedule
cms_pronews_sections
where 'cms' needs to be whatever you used as your chosen 3 letter sequence (default to cms).
layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1

layingback- Site Admin

- Messages: 1229
- Inscrit le: Mar 18, 2006
Re: Database error when creating section
Posté le: Fri Jul 22, 2011 4:45 am
Sorry but I still got error after deleting all the pro-news tables and reinstall. Here is the new error. INSERT INTO cms_pronews_sections VALUES (-1, 'Default', 'Default Section (Cannot be Altered)', 2, 2, 0, 0, 0, 1, '', '', '', '', '', '', '', '', '', '', '', '', '', 0, 0, 0, 0, 2, 0)
Column count doesn't match value count at row 1
heliown's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux,Apache/5.0/5.2/9..2

heliown- Sponsor

- Messages: 15
- Inscrit le: Feb 24, 2008
Re: Database error when creating section
Posté le: Fri Jul 22, 2011 6:40 am
Oh dear, I needed to update the initial record load in cpg_inst as well.
So on line 201 of modules/Pro_News/cpg_inst.php find:
$installer->add_query('INSERT', 'pronews_sections', "-1, 'Default', 'Default Section (Cannot be Altered)', 2, 2, 0, 0, 0, 1, '', '', '', '', '', '', '', '', '', '', '', '', '', 0, 0, 0, 0, 2, 0");
and repalce with:
$installer->add_query('INSERT', 'pronews_sections', "-1, 'Default', 'Default Section (Cannot be Altered)', 2, 2, 0, 0, 0, 1, '', '', '', '', '', '', '', '', '', '', '', '', '', 0, 0, 0, 0, 2, 0, 0");
ie. add an extra 0 parameter at the end for keydspfld.
And same for line 204, change:
$installer->add_query('INSERT', 'pronews_sections', "1, 'Members Pages', 'Member\'s Section (Cannot be Deleted)', 0, 2, 0, 1, 0, 1, '', '', '', '', '', '', '', '', '', '', '', '', '', 0, 0, 0, 0, 1, 0");
to:
$installer->add_query('INSERT', 'pronews_sections', "1, 'Members Pages', 'Member\'s Section (Cannot be Deleted)', 0, 2, 0, 1, 0, 1, '', '', '', '', '', '', '', '', '', '', '', '', '', 0, 0, 0, 0, 1, 0, 0");
[The new style installer is supposed to stop all this grief, I just tell it here's the new db layout I want, update the user's db to match regardless of current state. Unfortunately I have no way to know if any given site has the new installer or not, so can't use it as yet.]
Sorry for the trouble.
layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1

layingback- Site Admin

- Messages: 1229
- Inscrit le: Mar 18, 2006
Re: Database error when creating section
Posté le: Sat Jul 23, 2011 1:19 am
It is working now! You don't have to be sorry Layingback. You work hard to make this happen and I really appreciate your efforts. We don't have many new things for Dragonfly any more and you are among a few who still are still working on it. Keep up the good work. I am planning to use it as my front page soon once I loaded all my articles to pro-news.
heliown's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux,Apache/5.0/5.2/9..2

heliown- Sponsor

- Messages: 15
- Inscrit le: Feb 24, 2008
Re: Database error when creating section
Posté le: Sat Jul 23, 2011 10:10 am
Thanks heliown for the kind words and the donation - both are appreciated!
I'm not planning on deserting DragonflyCMS any time soon - but I could do with there being a bit more activity around here ![]()
Glad to hear that you are looking at Pro_News for your front page. I see Pro_News as really being a Website Development tool now, not merely a news replacement. We have several clients now with Pro_News-only websites.
Re loading your old News articles: import can do a fairly reasonable job these days, and if you experiment with an empty Default Cat/Section then you can easily delete all and retry until you get the best result. Of course all the external links will change, but if you really want the old articles in just for completeness, a strategy is to import, but leave the old News in place for Google only, but direct all new posts to Pro_News. (The other solution with intact external links involves Apache redirects which is beyond me I'm afraid.)
You are already a Sponsor member, so please make use of the premium support offered to ask any questions about implementation strategy ahead of time.
layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1

layingback- Site Admin

- Messages: 1229
- Inscrit le: Mar 18, 2006
Re: Database error when creating section
Posté le: Thu Aug 04, 2011 9:31 am
I'm installing v3.3.2.6 for the first time into a 9.2.1 site and encountering what seems to be the same error. Can someone outling exactly what I need to do, step by step, to get it working (I'm a little confused by the above)? Or is there going to be a new installation package available?
macavity's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
FreeBSD/Apache 10333100/MySQL 5.0.51/PHP 4.4.8/Dragonfly 9.1.2.1

macavity- Sponsor

- Messages: 24
- Inscrit le: Aug 03, 2011
Re: Database error when creating section
Posté le: Thu Aug 04, 2011 9:52 am
Attached is a replacement cpg_inst.php (zipped). You find it in /modules/Pro_News/
Please use as a replacement to save making the edits above.
BEFORE retrying the install you will need to enter phpMyAdmin (or whatever equivalent that you use) and delete/drop any of following files which might be present:
- cms_pronews_articles
- cms_pronews_blocks
- cms_pronews_cats
- cms_pronews_schedule
- cms_pronews_sections
where 'cms' may be different if you have used a non-=default db prefix.
UPDATE: Attachment deleted, see later corrected version a few posts below.
layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1
Dernière édition par layingback le Thu Aug 04, 2011 11:29 am; édité 1 fois

layingback- Site Admin

- Messages: 1229
- Inscrit le: Mar 18, 2006
Re: Database error when creating section
Posté le: Thu Aug 04, 2011 9:55 am
Do I also need to run the module uninstall routine from within DF?
macavity's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
FreeBSD/Apache 10333100/MySQL 5.0.51/PHP 4.4.8/Dragonfly 9.1.2.1

macavity- Sponsor

- Messages: 24
- Inscrit le: Aug 03, 2011
Re: Database error when creating section
Posté le: Thu Aug 04, 2011 10:04 am
You can try - if it works there will be no need to delete the files manually, and you'll be good to re-install. But usually the uninstall fails if the prior install had not completed fully, but if all 5 files are present it might/should work.
layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1

layingback- Site Admin

- Messages: 1229
- Inscrit le: Mar 18, 2006
Re: Database error when creating section
Posté le: Thu Aug 04, 2011 10:13 am
Thanks. All tables were present and the DF uninstall option appears to have removed them all. I'll retry the installation with the updated install file.
macavity's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
FreeBSD/Apache 10333100/MySQL 5.0.51/PHP 4.4.8/Dragonfly 9.1.2.1

macavity- Sponsor

- Messages: 24
- Inscrit le: Aug 03, 2011
Vous ne pouvez pas répondre aux sujets dans ce forum
Vous ne pouvez pas éditer vos messages dans ce forum
Vous ne pouvez pas supprimer vos messages dans ce forum
Vous ne pouvez pas voter dans les sondages de ce forum
You cannot attach files in this forum
You cannot download files in this forum
Toutes les heures sont au format GMT











