1 of 3
1
Required Category Extension
Posted: 03 June 2008 10:37 AM   [ Ignore ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  305
Joined  04-12-2008

Hey guys

Only one day later… wink I just finished creating this extension based on two posts here in the forums, you can check it out:

Required Category Extension

Feedback and bug reports are welcome.

 Signature 

gridonic | Twitter


URL Field Extension
Required Category Extension
DC FreeForm GeoIP Extension
DC Template Manager

Profile
 
 
Posted: 03 June 2008 01:09 PM   [ Ignore ]   [ # 1 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  277
Joined  10-10-2004

Nice, I can use this, thanks!

 Signature 

Twitter: @RobQuigley

Profile
 
 
Posted: 03 June 2008 01:22 PM   [ Ignore ]   [ # 2 ]  
Professor
Avatar
RankRankRankRankRankRankRank
Total Posts:  13771
Joined  04-15-2006

Another fantastic extension! wink

Cheers for this. Never needed to do this before but I’m sure it will probably be needed sooner than later.

Great! grin

Best wishes,

Mark

 Signature 

Shopping Cart Plugin | Full List Of Add-Ons | About Me
——————————————————————————————
2.x Bug Tracker | Upgrade Errors

Profile
 
 
Posted: 04 June 2008 06:12 AM   [ Ignore ]   [ # 3 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1156
Joined  02-02-2007

Hi peschehimself,

I installed and tried Required Category Extension; it works correctly.

But it seems that there is some issue with javascript - when I try to post an entry without assigning it to a category, Firebug shows this error

el_name has no properties
   
if (el_name.substring(0,8)=='field_id'


It is the line from this script:

//<![CDATA[
form_elements document.getElementById('entryform').elements;
var 
id_arr = new Array();
for(
i=0i<form_elements.lengthi++) {

el 
form_elements[i];
el_name el.name;
toggle 0;

if (
el_name.substring(0,8)=='field_id'

This error began to appear when I installed Required category extension and set categories to be required for that particular weblog, so it seems that this error is somehow related to Required category extension.

 Signature 

Full list of add-ons here

Child Categories
Browser Sniff
Category Id
Entries Number

Profile
 
 
Posted: 04 June 2008 06:35 AM   [ Ignore ]   [ # 4 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  305
Joined  04-12-2008

Hi Laisvunas

Very strange as my extension does not modify or add any javascript to the CP.

Could you double check if it’s really my extension that’s causing the problem?
Try deactivating all other extensions but Required Category and recheck. I checked it on our dev server and firebug does not throw any error on my side.

Cheers,
Peter.

 Signature 

gridonic | Twitter


URL Field Extension
Required Category Extension
DC FreeForm GeoIP Extension
DC Template Manager

Profile
 
 
Posted: 04 June 2008 12:06 PM   [ Ignore ]   [ # 5 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1156
Joined  02-02-2007

Hi Peter,

You are right. Javascript error is caused by Auto Collapse Empty Custom Fields extension v.1.1.

About this error I have posted an entry in this extension’s forum thread here.

 Signature 

Full list of add-ons here

Child Categories
Browser Sniff
Category Id
Entries Number

Profile
 
 
Posted: 04 June 2008 12:09 PM   [ Ignore ]   [ # 6 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  305
Joined  04-12-2008

Hi

Thanks for clarifying. In the other thread you posted that the Auto Collapse Empty Custom Fields only is buggy when used together with my extension. Are you sure? Did you try turning off every exension but the Auto Collapse? Can you try that?

As on my side, i don’t see anything that could / would clash with some other extension on the javascript side.

 Signature 

gridonic | Twitter


URL Field Extension
Required Category Extension
DC FreeForm GeoIP Extension
DC Template Manager

Profile
 
 
Posted: 04 June 2008 12:58 PM   [ Ignore ]   [ # 7 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  500
Joined  02-05-2002

FYI thread updated

Profile
 
 
Posted: 06 June 2008 04:13 AM   [ Ignore ]   [ # 8 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1156
Joined  02-02-2007

Hi,

When I edit weblog group preferences at
CP Home ›  Admin ›  Weblog Administration ›  Weblog Management ›  Edit Weblog
that is, assign weblog to category group or field group, I get this PHP notice (repeated twice):

Notice: Undefined offset: 0 in /www/eh5659/public_html/eesys/extensions/ext.dc_required_category.php on line 215

Notice: Undefined offset: 0 in /www/eh5659/public_html/eesys/extensions/ext.dc_required_category.php on line 215

Despite these notices weblog group preferences were updated correctly.

It seems that this is a small bug in Required category plugin.

 Signature 

Full list of add-ons here

Child Categories
Browser Sniff
Category Id
Entries Number

Profile
 
 
Posted: 06 June 2008 07:09 AM   [ Ignore ]   [ # 9 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  305
Joined  04-12-2008

Hi Laisvunas

I fixed the bug, please get the newest version here

http://www.designchuchi.ch/index.php/blog/comments/required-category-extension/

This bug only happenned if you use “Update & Finished” in the weblog administration and was only a minor bug.

Hope all works now,
Peter.

 Signature 

gridonic | Twitter


URL Field Extension
Required Category Extension
DC FreeForm GeoIP Extension
DC Template Manager

Profile
 
 
Posted: 06 June 2008 07:19 AM   [ Ignore ]   [ # 10 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  175
Joined  05-25-2002

Hi, I’m using SAEF. When the category is not choose, I get error:

Fatal errorCall to a member function new_entry_form() on a non-object in /www/website/public_html/admin/extensions/ext.dc_required_category.php on line 143 

Thanks for the useful extension!

 Signature 

+ CM faviconizEE
+ CM Nice URL
+ CM Strange URL Interpreter
+ CM Textarea Resizer
+ CM Template Editor

Profile
 
 
Posted: 06 June 2008 07:24 AM   [ Ignore ]   [ # 11 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  175
Joined  05-25-2002

The extension works fine on 1.6.3 but I’m trying on 1.6.2 (build 20080206). When I want activate feature for a weblog, I get error:

MySQL ERROR:

Error Number1064

Description
You have an error in your SQL syntaxCheck the manual that corresponds to your MySQL server version for the right syntax to use near 'ON DUPLICATE KEY UPDATE `weblog_id`=values(`weblog_id`), requir

Query: INSERT INTO exp_dc_required_cat VALUES('', '
2', '1') ON DUPLICATE KEY UPDATE `weblog_id`=values(`weblog_id`), require_cat=values(`require_cat`) 
 Signature 

+ CM faviconizEE
+ CM Nice URL
+ CM Strange URL Interpreter
+ CM Textarea Resizer
+ CM Template Editor

Profile
 
 
Posted: 06 June 2008 07:25 AM   [ Ignore ]   [ # 12 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  305
Joined  04-12-2008

What MySQL version are you on? This extension requires at least version 4.1.0

 Signature 

gridonic | Twitter


URL Field Extension
Required Category Extension
DC FreeForm GeoIP Extension
DC Template Manager

Profile
 
 
Posted: 06 June 2008 07:30 AM   [ Ignore ]   [ # 13 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  175
Joined  05-25-2002

I’m running on MySQL 5.0.51a

 Signature 

+ CM faviconizEE
+ CM Nice URL
+ CM Strange URL Interpreter
+ CM Textarea Resizer
+ CM Template Editor

Profile
 
 
Posted: 06 June 2008 07:50 AM   [ Ignore ]   [ # 14 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1156
Joined  02-02-2007

Hi Peter,

Just tested new version. Everything now works correctly, without any PHP notices being thrown.

Thank you very much for excellent extension and debugging.

 Signature 

Full list of add-ons here

Child Categories
Browser Sniff
Category Id
Entries Number

Profile
 
 
Posted: 06 June 2008 06:27 PM   [ Ignore ]   [ # 15 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1156
Joined  02-02-2007

Hi Peter,

While trying to update an entry, which has categories set to be required, I got this PHP warning:

Warning: Cannot modify header information - headers already sent by (output started at /www/eh5956/public_html/system/extensions/ext.dc_required_category.php:275) in /www/eh5956/public_html/system/core/core.functions.php on line 296

Entry was not updated.

Then I tried to update entries in other weblogs, both those which have categories set to be required and those which have not categories set to be required, and found that it is not possible to update entries at all!

 Signature 

Full list of add-ons here

Child Categories
Browser Sniff
Category Id
Entries Number

Profile
 
 
Posted: 06 June 2008 06:35 PM   [ Ignore ]   [ # 16 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1156
Joined  02-02-2007

After disabling Required Category Extension it is possible again to update entries.

It seems that this interference with updating of entries is serious bug.

 Signature 

Full list of add-ons here

Child Categories
Browser Sniff
Category Id
Entries Number

Profile
 
 
Posted: 07 June 2008 03:13 AM   [ Ignore ]   [ # 17 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  305
Joined  04-12-2008

Do you have the latest version from here?

http://www.designchuchi.ch/index.php/blog/comments/required-category-extension

I tested this locally and on a dev server and i have no problems updating entries.

 Signature 

gridonic | Twitter


URL Field Extension
Required Category Extension
DC FreeForm GeoIP Extension
DC Template Manager

Profile
 
 
Posted: 07 June 2008 03:51 AM   [ Ignore ]   [ # 18 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1156
Joined  02-02-2007

Hi Peter,

I had the latest version, that is, version 1.0.1. Despite of this I downloaded the files from your site, reinstalled extension and the problem disappeared.

So, it seems that with extension is everything OK. I do not find any explanation what might have caused the problem.

Thanks for extension and for the help.

 Signature 

Full list of add-ons here

Child Categories
Browser Sniff
Category Id
Entries Number

Profile
 
 
   
1 of 3
1