1 of 2
1
Required Category Extension
Posted: 03 June 2008 08:37 AM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  247
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 

Designchuchi | Twitter

URL Field Extension
Required Category Extension
DC FreeForm GeoIP Extension

Profile
 
 
Posted: 03 June 2008 11:09 AM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  420
Joined  10-10-2004

Nice, I can use this, thanks!

Profile
 
 
Posted: 03 June 2008 11:22 AM   [ Ignore ]   [ # 2 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6617
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 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 04 June 2008 04:12 AM   [ Ignore ]   [ # 3 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  290
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=0; i<form_elements.length; i++) {

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 plugins here

Child Categories
Browser Sniff
Category Id
Entries List

Profile
 
 
Posted: 04 June 2008 04:35 AM   [ Ignore ]   [ # 4 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  247
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 

Designchuchi | Twitter

URL Field Extension
Required Category Extension
DC FreeForm GeoIP Extension

Profile
 
 
Posted: 04 June 2008 10:06 AM   [ Ignore ]   [ # 5 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  290
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 plugins here

Child Categories
Browser Sniff
Category Id
Entries List

Profile
 
 
Posted: 04 June 2008 10:09 AM   [ Ignore ]   [ # 6 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  247
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 

Designchuchi | Twitter

URL Field Extension
Required Category Extension
DC FreeForm GeoIP Extension

Profile
 
 
Posted: 04 June 2008 10:58 AM   [ Ignore ]   [ # 7 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  879
Joined  02-05-2002

FYI thread updated

 Signature 

Member of the EE Pro Network

Profile
 
 
Posted: 06 June 2008 02:13 AM   [ Ignore ]   [ # 8 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  290
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 plugins here

Child Categories
Browser Sniff
Category Id
Entries List

Profile
 
 
Posted: 06 June 2008 05:09 AM   [ Ignore ]   [ # 9 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  247
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 

Designchuchi | Twitter

URL Field Extension
Required Category Extension
DC FreeForm GeoIP Extension

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

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

Fatal error: Call 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 

Caleydon Media

+ CM Strange URL Interpreter
+ CM Textarea Resizer
+ CM Template Editor (EditArea)

Profile
 
 
Posted: 06 June 2008 05:24 AM   [ Ignore ]   [ # 11 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  137
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 Number: 1064

Description
: You have an error in your SQL syntax. Check 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 

Caleydon Media

+ CM Strange URL Interpreter
+ CM Textarea Resizer
+ CM Template Editor (EditArea)

Profile
 
 
Posted: 06 June 2008 05:25 AM   [ Ignore ]   [ # 12 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  247
Joined  04-12-2008

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

 Signature 

Designchuchi | Twitter

URL Field Extension
Required Category Extension
DC FreeForm GeoIP Extension

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

I’m running on MySQL 5.0.51a

 Signature 

Caleydon Media

+ CM Strange URL Interpreter
+ CM Textarea Resizer
+ CM Template Editor (EditArea)

Profile
 
 
Posted: 06 June 2008 05:50 AM   [ Ignore ]   [ # 14 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  290
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 plugins here

Child Categories
Browser Sniff
Category Id
Entries List

Profile
 
 
Posted: 06 June 2008 04:27 PM   [ Ignore ]   [ # 15 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  290
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 plugins here

Child Categories
Browser Sniff
Category Id
Entries List

Profile
 
 
Posted: 06 June 2008 04:35 PM   [ Ignore ]   [ # 16 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  290
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 plugins here

Child Categories
Browser Sniff
Category Id
Entries List

Profile
 
 
Posted: 07 June 2008 01:13 AM   [ Ignore ]   [ # 17 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  247
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 

Designchuchi | Twitter

URL Field Extension
Required Category Extension
DC FreeForm GeoIP Extension

Profile
 
 
Posted: 07 June 2008 01:51 AM   [ Ignore ]   [ # 18 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  290
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 plugins here

Child Categories
Browser Sniff
Category Id
Entries List

Profile
 
 
   
1 of 2
1
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 65102 Total Logged-in Users: 60
Total Topics: 82263 Total Anonymous Users: 23
Total Replies: 442112 Total Guests: 248
Total Posts: 524375    
Members ( View Memberlist )