Elementor Archive Template not showing posts (CPT) - custom-post-type

Problem: I created an Elementor archive template to display the CPT posts on a category page. Yet, it shows no posts (CPT).
The CPT is called item. Here are the arguments:
$args = array(
'label' => __( 'Item', 'text_domain' ),
'description' => __( 'Add an Item', 'text_domain' ),
'labels' => $labels,
'supports' => array( 'title', 'revisions', 'custom-fields', 'thumbnail', 'page-attributes'),
'taxonomies' => array('category', 'maker', 'material', 'condition'),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-edit',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'show_in_rest' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'post',
);
Here are the template details and conditions:
When I test my template I get:

Related

Cannot connect to Laravel Websocket over HTTPS

Using Laravel-Websocket and Pusher Replacement.
I have no problem connecting to the same websocket server using http protocol.
But I could not connect using HTTPS. Can I just use HTTP and not setup SSL in the PHP side? What is the best solution for this? Thanks a lot!
NodeJS Code
const options = {
wsHost: "xxx",
wsPort: 6001,
wssPort: 6001,
key: "somekey",
broadcaster: "pusher",
forceTLS: false,
disableStats: true,
namespace: false,
enabledTransports: ['ws', 'wss'],
};
const client = new Pusher(options.key, options);
laravel config/broadcasting.php
'connections' => [
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'encrypted' => true,
'host' => env('LARAVEL_WEBSOCKETS_HOST'),
'port' => env('LARAVEL_WEBSOCKETS_PORT', 6001),
'scheme' => 'http'
],
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
],
'log' => [
'driver' => 'log',
],
'null' => [
'driver' => 'null',
],
],

How to remove geoJSON shape stroke in Leaflet?

The situation is that of the image:
This is the code (see click event):
private initRegionsLayer() {
const layer = new GeoJSON(this.regions, {
style: (feature) =>
this.styleService.regionsStyleMaker(feature, this.data, this.type),
onEachFeature: (feature, layer) => {
layer.on({
mouseover: (e) =>
this.highlightShapeService.highlightShape(e, feature, this.data),
mouseout: (e) => this.highlightShapeService.resetShape(e),
click: (e) => {
e.target.setStyle({
stroke: false,
})
},
});
const foundRecord = this.data.find(
(item: { regione: any }) =>
feature.properties['Regione'] === item.regione
);
if (foundRecord) {
layer.bindTooltip(this.popupService.regionsPopup(foundRecord), {
direction: 'right',
permanent: false,
sticky: true,
offset: [20, 0],
opacity: 0.9,
});
}
},
});
Even if I try to set "stroke" to "false", nothing happens.
How to solve? Thanks!

WinstonJS custom level to file

I changed the default levels in Winston.JS, to remove 2 levels and add 1 custom level. I want to log that new level in an separated file. So that file will only contains logs from that level.
const appRoot = require('app-root-path');
const winston = require('winston');
require('winston-daily-rotate-file');
const levels = {
levels: {
product: 0,
error: 1,
warn: 2,
info: 3,
debug: 4,
product: 5,
},
colors: {
product: 'magenta',
error: 'red',
warning: 'yellow',
info: 'green',
debug: 'blue',
}
}
const logger = winston.createLogger({
levels: levels.levels,
format: winston.format.combine(
winston.format.colorize(),
winston.format.timestamp({
format: 'DD-MM-YYYY HH:mm:ss'
}),
winston.format.printf(info => `[${info.timestamp}] [${info.level}]: ${info.message}`)
),
transports: [
new winston.transports.DailyRotateFile({
filename: `${appRoot}/logs/error-%DATE%.log`,
level: 'error',
datePattern: 'YYYY-MM-DD',
maxSize: '20m',
maxFiles: '14d'
}),
new winston.transports.DailyRotateFile({
filename: `${appRoot}/logs/product-%DATE%.log`,
level: 'product',
datePattern: 'YYYY-MM-DD',
maxSize: '20m',
maxFiles: '14d'
})
]
})
winston.addColors(levels.colors);
logger.stream = {
write: (message, encoding) => {
logger.info(message);
}
}
In this case, I want to place all the console.product() logs in the product-%DATE%.log file.
Currently the file is filled, but only with the information which is also showed in the log about from express (app.use(morgan("combined", {stream: winston.stream}));)
In development I also adding an extra transport for debug on the console:
let env = process.env.NODE_ENV;
if (env !== 'production'){
logger.add(new winston.transports.Console({
level: 'debug',
prettyPrint: function ( object ){
return JSON.stringify(object);
}
}))
}
How can I get only the console.product() logs into the product.log file?
I have fixed this with the help of this code snippet: https://github.com/winstonjs/winston/issues/614#issuecomment-405015322
So my whole config now looks like this:
const appRoot = require('app-root-path');
const winston = require('winston');
const path = require('path')
require('winston-daily-rotate-file');
const levels = {
levels: {
product: 1,
error: 1,
warn: 3,
info: 4,
debug: 5
},
colors: {
product: 'magenta',
error: 'red',
warning: 'yellow',
info: 'green',
debug: 'blue',
}
}
let getLabel = function(callingModule){
//To support files which don't have an module
if(typeof callingModule == 'string'){
return callingModule;
}
let parts = callingModule.filename.split(path.sep);
return path.join(parts[parts.length -2], parts.pop());
}
const errorFilter = winston.format( (info, opts) => {
return info.level == 'error' ? info : false;
})
const productFilter = winston.format( (info, opts) => {
return info.level == 'product' ? info : false
})
module.exports = function(callingModule){
const logger = winston.createLogger({
levels: levels.levels,
format: winston.format.combine(
winston.format.colorize(),
winston.format.timestamp({
format: 'DD-MM-YYYY HH:mm:ss'
}),
winston.format.label({label: getLabel(callingModule)}),
winston.format.printf(info => `[${info.timestamp}] [${info.level}] [${info.label}]: ${info.message}`)
),
transports: [
new winston.transports.DailyRotateFile({
name: "Error logs",
filename: `${appRoot}/logs/error-%DATE%.log`,
level: 'error',
label: getLabel(callingModule),
datePattern: 'YYYY-MM-DD',
maxSize: '20m',
maxFiles: '14d',
format: winston.format.combine(
errorFilter(),
winston.format.colorize(),
winston.format.timestamp({
format: 'DD-MM-YYYY HH:mm:ss'
}),
winston.format.label({label: getLabel(callingModule)}),
winston.format.printf(info => `[${info.timestamp}] [${info.level}] [${info.label}]: ${info.message}`)
),
}),
new winston.transports.DailyRotateFile({
name: "Product logs",
filename: `${appRoot}/logs/product-%DATE%.log`,
level: 'product',
label: getLabel(callingModule),
datePattern: 'YYYY-MM-DD',
maxSize: '20m',
maxFiles: '14d',
format: winston.format.combine(
productFilter(),
winston.format.colorize(),
winston.format.timestamp({
format: 'DD-MM-YYYY HH:mm:ss'
}),
winston.format.label({label: getLabel(callingModule)}),
winston.format.printf(info => `[${info.timestamp}] [${info.level}] [${info.label}]: ${info.message}`)
),
})
]
})
winston.addColors(levels.colors);
let env = process.env.NODE_ENV;
if (env !== 'production'){
logger.add(new winston.transports.Console({
name: "Debug logs",
level: 'debug',
label: getLabel(callingModule),
prettyPrint: function ( object ){
return JSON.stringify(object);
}
}))
}
else if (env !== 'development') {
logger.add(winston.transports.DailyRotateFile({
name: "Combined logs",
filename: `${appRoot}/logs/combined-%DATE%.log`,
level: 'error',
datePattern: 'YYYY-MM-DD-HH',
maxSize: '20m',
maxFiles: '14d'
}))
}
logger.stream = {
write: (message, encoding) => {
logger.info(message);
}
}
return logger;
}
I also noticed that I was declaring the product level twice with priority 1 and 5.
On the different transports, I added an filter which is based on the code which I found on Github. It will filter the printed logs to only the set level.
To show the filename of the calling file in the log I added the callingModule.
Now I can require the console with
const console = require(path.join(__dirname, 'winston.config'))(module);
The call
console.info('NODE_ENV is undefined or its value was not understood. Default to development mode. ');
Will look as [28-08-2019 11:39:51] [info] [config\env.config.js]: NODE_ENV is undefined or its value was not understood. Default to development mode. in the log.

Logging metadata in Winston with custom formatter

I'm trying to log stacktrace along with error message using Winston.
My logger is configured with custom formatter:
this.errorLogger = winston.createLogger({
levels: this.levels,
level: 'error',
transports: [
new WinstonFileRotator({
filename: '%DATE%.log',
dirname: 'logs/error',
zippedArchive: true,
maxSize: '20m',
maxFiles: '14d',
handleExceptions: true,
json: false,
format: winston.format.combine(
winston.format.timestamp({
format: 'YYYY-MM-DD HH:mm:ss'
}),
winston.format.printf(info => {
return '[${info.timestamp}] -> ${info.message}';
}),
),
})
]
});
I log the error along with stacktrace:
this.errorLogger.error('My message', ex.Stack);
In my log I have a line:
[2018-09-03 23:41:14] -> My message
How can I access in my custom formatter the metadata that I passed to error function along with the message?
I have been working on a similar issue. In the end, I did:
const winston = require('winston');
const logger = winston.createLogger({
level: 'info',
format: winston.format.combine(
winston.format.label({ label: 'MY-SILLY-APP' }),
winston.format.timestamp(),
winston.format.metadata({ fillExcept: ['message', 'level', 'timestamp', 'label'] }),
winston.format.colorize(),
winston.format.printf(info => {
let out = `${info.timestamp} [${info.label}] ${info.level}: ${info.message}`;
if (info.metadata.error) {
out = out + ' ' + info.metadata.error;
if (info.metadata.error.stack) {
out = out + ' ' + info.metadata.error.stack;
}
}
return out;
}),
),
transports: [
new winston.transports.Console()
]
});
logger.info('running');
try {
throw new Error('failed');
} catch (err) {
logger.error('failing', { error: err });
}
logger.info('stopping');

Drupal 6 CCK: export/import content types

I've been having a problem with a certain content type. (Any time I try to access a node of that type, I get a page not found error.) So I thought I'd export and re-import, to see if that changes anything.
I went to admin/content/types/export, and selected the content type in question. Then I deleted that type. Next, I went to admin/content/types/import, and pasted the export back in.
I choose <create> and hit import, and I get the following Drupal messages:
[error] An illegal choice has been detected. Please contact the site administrator.
[info] An error has occurred adding the content type recruiting_form.
Please check the errors displayed for more details.
What am I doing wrong here?
This is the export:
$content['type'] = array (
'name' => 'Recruiting Form',
'type' => 'recruiting_form',
'description' => 'Form for prospective fencers',
'title_label' => 'Legal name',
'body_label' => '',
'min_word_count' => '0',
'help' => 'If you have any questions, contact $RECRUITING$.
<br /> <br />
Once this form is submitted, you will not be able to view or edit it. Use the "preview" button to make sure everything is correct.',
'input_formats' =>
array (
1 => true,
0 => 1,
2 => false,
3 => false,
4 => false,
5 => false,
),
'node_options' =>
array (
'status' => true,
'promote' => false,
'sticky' => false,
'revision' => false,
),
'language_content_type' => '0',
'upload' => '1',
'old_type' => 'recruiting_form',
'orig_type' => '',
'module' => 'node',
'custom' => '1',
'modified' => '1',
'locked' => '0',
'comment' => '0',
'comment_default_mode' => '4',
'comment_default_order' => '1',
'comment_default_per_page' => '50',
'comment_controls' => '3',
'comment_anonymous' => '0',
'comment_subject_field' => '1',
'comment_preview' => '1',
'comment_form_location' => '0',
);
$content['groups'] = array (
0 =>
array (
'label' => 'Basic Information',
'group_type' => 'standard',
'settings' =>
array (
'form' =>
array (
'style' => 'fieldset_collapsible',
'description' => '',
),
'display' =>
array (
'description' => '',
'teaser' =>
array (
'format' => 'fieldset',
'exclude' => 0,
),
'full' =>
array (
'format' => 'fieldset',
'exclude' => 0,
),
4 =>
array (
'format' => 'fieldset',
'exclude' => 0,
),
2 =>
array (
'format' => 'fieldset',
'exclude' => 0,
),
3 =>
array (
'format' => 'fieldset',
'exclude' => 0,
),
'token' =>
array (
'format' => 'fieldset',
'exclude' => 0,
),
'label' => 'above',
),
),
'weight' => '2',
'group_name' => 'group_basic_info',
),
1 =>
array (
'label' => 'Fencing Information',
'group_type' => 'standard',
'settings' =>
array (
'form' =>
array (
'style' => 'fieldset_collapsible',
'description' => '',
),
'display' =>
array (
'description' => '',
'teaser' =>
array (
'format' => 'fieldset',
'exclude' => 0,
),
'full' =>
array (
'format' => 'fieldset',
'exclude' => 0,
),
4 =>
array (
'format' => 'fieldset',
'exclude' => 0,
),
2 =>
array (
'format' => 'fieldset',
'exclude' => 0,
),
3 =>
array (
'format' => 'fieldset',
'exclude' => 0,
),
'token' =>
array (
'format' => 'fieldset',
'exclude' => 0,
),
'label' => 'above',
),
),
'weight' => '11',
'group_name' => 'group_fencing_information',
),
);
$content['fields'] = array (
0 =>
array (
'label' => 'Email',
'field_name' => 'field_email',
'type' => 'email',
'widget_type' => 'email_textfield',
'change' => 'Change basic information',
'weight' => '1',
'size' => '60',
'description' => '',
'default_value' =>
array (
0 =>
array (
'email' => '',
),
),
'default_value_php' => '',
'default_value_widget' => NULL,
'group' => 'group_basic_info',
'required' => 1,
'multiple' => '0',
'op' => 'Save field settings',
'module' => 'email',
'widget_module' => 'email',
'columns' =>
array (
'email' =>
array (
'type' => 'varchar',
'length' => 255,
'not null' => false,
'sortable' => true,
),
),
'display_settings' =>
array (
'label' =>
array (
'format' => 'above',
'exclude' => 0,
),
'teaser' =>
array (
'format' => 'default',
'exclude' => 0,
),
'full' =>
array (
'format' => 'default',
'exclude' => 0,
),
4 =>
array (
'format' => 'default',
'exclude' => 0,
),
2 =>
array (
'format' => 'default',
'exclude' => 0,
),
3 =>
array (
'format' => 'default',
'exclude' => 0,
),
'token' =>
array (
'format' => 'default',
'exclude' => 0,
),
),
),
1 =>
array (
'label' => 'Matriculation',
'field_name' => 'field_matriculation',
'type' => 'datetime',
'widget_type' => 'date_text',
'change' => 'Change basic information',
'weight' => '2',
'default_value' => 'blank',
'default_value2' => 'same',
'default_value_code' => '',
'default_value_code2' => '',
'input_format' => 'm/d/Y - g:i:sa',
'input_format_custom' => 'Y',
'advanced' =>
array (
'label_position' => 'above',
'text_parts' =>
array (
'year' => 0,
'month' => 0,
'day' => 0,
'hour' => 0,
'minute' => 0,
'second' => 0,
),
),
'increment' => 1,
'year_range' => '-3:+3',
'label_position' => 'above',
'text_parts' =>
array (
),
'description' => 'Expected year of matriculation into college',
'group' => 'group_basic_info',
'required' => 1,
'multiple' => '0',
'repeat' => 0,
'todate' => '',
'granularity' =>
array (
'year' => 'year',
),
'default_format' => 'medium',
'tz_handling' => 'none',
'timezone_db' => 'America/New_York',
'op' => 'Save field settings',
'module' => 'date',
'widget_module' => 'date',
'columns' =>
array (
'value' =>
array (
'type' => 'datetime',
'not null' => false,
'sortable' => true,
'views' => true,
),
),
'display_settings' =>
array (
'label' =>
array (
'format' => 'above',
'exclude' => 0,
),
'teaser' =>
array (
'format' => 'default',
'exclude' => 0,
),
'full' =>
array (
'format' => 'default',
'exclude' => 0,
),
4 =>
array (
'format' => 'default',
'exclude' => 0,
),
2 =>
array (
'format' => 'default',
'exclude' => 0,
),
3 =>
array (
'format' => 'default',
'exclude' => 0,
),
'token' =>
array (
'format' => 'default',
'exclude' => 0,
),
),
),
2 =>
array (
'label' => 'Name of High School',
'field_name' => 'field_hs_name',
'type' => 'text',
'widget_type' => 'text_textfield',
'change' => 'Change basic information',
'weight' => '3',
'rows' => 5,
'size' => '60',
'description' => '',
'default_value' =>
array (
),
'default_value_php' => '',
'default_value_widget' =>
array (
'field_hs_name' =>
array (
0 =>
array (
'value' => '',
'_error_element' => 'default_value_widget][field_hs_name][0][value',
),
),
),
'group' => 'group_basic_info',
'required' => 0,
'multiple' => '0',
'text_processing' => '0',
'max_length' => '',
'allowed_values' => '',
'allowed_values_php' => '',
'op' => 'Save field settings',
'module' => 'text',
'widget_module' => 'text',
'columns' =>
array (
'value' =>
array (
'type' => 'text',
'size' => 'big',
'not null' => false,
'sortable' => true,
'views' => true,
),
),
'display_settings' =>
array (
'label' =>
array (
'format' => 'above',
'exclude' => 0,
),
'teaser' =>
array (
'format' => 'default',
'exclude' => 0,
),
'full' =>
array (
'format' => 'default',
'exclude' => 0,
),
4 =>
array (
'format' => 'default',
'exclude' => 0,
),
2 =>
array (
'format' => 'default',
'exclude' => 0,
),
3 =>
array (
'format' => 'default',
'exclude' => 0,
),
'token' =>
array (
'format' => 'default',
'exclude' => 0,
),
),
),
3 =>
array (
'label' => 'GPA',
'field_name' => 'field_gpa',
'type' => 'number_float',
'widget_type' => 'number',
'change' => 'Change basic information',
'weight' => '4',
'description' => '4.0 scale. If your school doesn\'t have GPA, leave it blank.',
'default_value' =>
array (
),
'default_value_php' => '',
'default_value_widget' =>
array (
'field_gpa' =>
array (
0 =>
array (
'value' => '',
'_error_element' => 'default_value_widget][field_gpa][0][value',
),
),
),
'group' => 'group_basic_info',
'required' => 0,
'multiple' => '0',
'min' => '0',
'max' => '4',
'prefix' => '',
'suffix' => '',
'allowed_values' => '',
'allowed_values_php' => '',
'op' => 'Save field settings',
'module' => 'number',
'widget_module' => 'number',
'columns' =>
array (
'value' =>
array (
'type' => 'float',
'not null' => false,
'sortable' => true,
),
),
'display_settings' =>
array (
'label' =>
array (
'format' => 'above',
'exclude' => 0,
),
'teaser' =>
array (
'format' => 'default',
'exclude' => 0,
),
'full' =>
array (
'format' => 'default',
'exclude' => 0,
),
4 =>
array (
'format' => 'default',
'exclude' => 0,
),
2 =>
array (
'format' => 'default',
'exclude' => 0,
),
3 =>
array (
'format' => 'default',
'exclude' => 0,
),
'token' =>
array (
'format' => 'default',
'exclude' => 0,
),
),
),
4 =>
array (
'label' => 'SAT',
'field_name' => 'field_sat',
'type' => 'number_integer',
'widget_type' => 'number',
'change' => 'Change basic information',
'weight' => '5',
'description' => 'Cumulative SAT score',
'default_value' =>
array (
),
'default_value_php' => '',
'default_value_widget' =>
array (
'field_sat' =>
array (
0 =>
array (
'value' => '',
'_error_element' => 'default_value_widget][field_sat][0][value',
),
),
),
'group' => 'group_basic_info',
'required' => 0,
'multiple' => '0',
'min' => '0',
'max' => '2400',
'prefix' => '',
'suffix' => '',
'allowed_values' => '',
'allowed_values_php' => '',
'op' => 'Save field settings',
'module' => 'number',
'widget_module' => 'number',
'columns' =>
array (
'value' =>
array (
'type' => 'int',
'not null' => false,
'sortable' => true,
),
),
'display_settings' =>
array (
'label' =>
array (
'format' => 'above',
'exclude' => 0,
),
'teaser' =>
array (
'format' => 'default',
'exclude' => 0,
),
'full' =>
array (
'format' => 'default',
'exclude' => 0,
),
4 =>
array (
'format' => 'default',
'exclude' => 0,
),
2 =>
array (
'format' => 'default',
'exclude' => 0,
),
3 =>
array (
'format' => 'default',
'exclude' => 0,
),
'token' =>
array (
'format' => 'default',
'exclude' => 0,
),
),
),
5 =>
array (
'label' => 'ACT',
'field_name' => 'field_act',
'type' => 'number_integer',
'widget_type' => 'number',
'change' => 'Change basic information',
'weight' => '6',
'description' => 'Cumulative ACT score',
'default_value' =>
array (
),
'default_value_php' => '',
'default_value_widget' =>
array (
'field_act' =>
array (
0 =>
array (
'value' => '',
'_error_element' => 'default_value_widget][field_act][0][value',
),
),
),
'group' => 'group_basic_info',
'required' => 0,
'multiple' => '0',
'min' => '0',
'max' => '36',
'prefix' => '',
'suffix' => '',
'allowed_values' => '',
'allowed_values_php' => '',
'op' => 'Save field settings',
'module' => 'number',
'widget_module' => 'number',
'columns' =>
array (
'value' =>
array (
'type' => 'int',
'not null' => false,
'sortable' => true,
),
),
'display_settings' =>
array (
'label' =>
array (
'format' => 'above',
'exclude' => 0,
),
'teaser' =>
array (
'format' => 'default',
'exclude' => 0,
),
'full' =>
array (
'format' => 'default',
'exclude' => 0,
),
4 =>
array (
'format' => 'default',
'exclude' => 0,
),
2 =>
array (
'format' => 'default',
'exclude' => 0,
),
3 =>
array (
'format' => 'default',
'exclude' => 0,
),
'token' =>
array (
'format' => 'default',
'exclude' => 0,
),
),
),
6 =>
array (
'label' => 'College(s)',
'field_name' => 'field_colleges',
'type' => 'text',
'widget_type' => 'optionwidgets_select',
'change' => 'Change basic information',
'weight' => '7',
'description' => 'colleges to which you are applying (2 at most)',
'default_value' =>
array (
0 =>
array (
'value' => NULL,
),
),
'default_value_php' => '',
'default_value_widget' =>
array (
'field_colleges' =>
array (
'value' =>
array (
0 => NULL,
),
),
),
'group' => 'group_basic_info',
'required' => 0,
'multiple' => '2',
'text_processing' => '0',
'max_length' => '',
'allowed_values' => 'Arts and Sciences
Industrial Labor Relations
Hotel Administration
Human Ecology
Agriculture and Life Sciences
Engineering
Art, Architecture, and Planning',
'allowed_values_php' => '',
'op' => 'Save field settings',
'module' => 'text',
'widget_module' => 'optionwidgets',
'columns' =>
array (
'value' =>
array (
'type' => 'text',
'size' => 'big',
'not null' => false,
'sortable' => true,
'views' => true,
),
),
'display_settings' =>
array (
'label' =>
array (
'format' => 'above',
'exclude' => 0,
),
'teaser' =>
array (
'format' => 'default',
'exclude' => 0,
),
'full' =>
array (
'format' => 'default',
'exclude' => 0,
),
4 =>
array (
'format' => 'default',
'exclude' => 0,
),
2 =>
array (
'format' => 'default',
'exclude' => 0,
),
3 =>
array (
'format' => 'default',
'exclude' => 0,
),
'token' =>
array (
'format' => 'default',
'exclude' => 0,
),
),
),
7 =>
array (
'label' => 'Intended Major',
'field_name' => 'field_intended_major',
'type' => 'text',
'widget_type' => 'text_textfield',
'change' => 'Change basic information',
'weight' => '8',
'rows' => 5,
'size' => '60',
'description' => '',
'default_value' =>
array (
),
'default_value_php' => '',
'default_value_widget' =>
array (
'field_intended_major' =>
array (
0 =>
array (
'value' => '',
'_error_element' => 'default_value_widget][field_intended_major][0][value',
),
),
),
'group' => 'group_basic_info',
'required' => 0,
'multiple' => '0',
'text_processing' => '0',
'max_length' => '',
'allowed_values' => '',
'allowed_values_php' => '',
'op' => 'Save field settings',
'module' => 'text',
'widget_module' => 'text',
'columns' =>
array (
'value' =>
array (
'type' => 'text',
'size' => 'big',
'not null' => false,
'sortable' => true,
'views' => true,
),
),
'display_settings' =>
array (
'label' =>
array (
'format' => 'above',
'exclude' => 0,
),
'teaser' =>
array (
'format' => 'default',
'exclude' => 0,
),
'full' =>
array (
'format' => 'default',
'exclude' => 0,
),
4 =>
array (
'format' => 'default',
'exclude' => 0,
),
2 =>
array (
'format' => 'default',
'exclude' => 0,
),
3 =>
array (
'format' => 'default',
'exclude' => 0,
),
'token' =>
array (
'format' => 'default',
'exclude' => 0,
),
),
),
8 =>
array (
'label' => 'Weapons',
'field_name' => 'field_weapons',
'type' => 'text',
'widget_type' => 'optionwidgets_select',
'change' => 'Change basic information',
'weight' => '12',
'description' => 'Which weapons do you fence?',
'default_value' =>
array (
),
'default_value_php' => '',
'default_value_widget' =>
array (
'field_weapons' =>
array (
'value' =>
array (
),
),
),
'group' => 'group_fencing_information',
'required' => 0,
'multiple' => '3',
'text_processing' => '0',
'max_length' => '',
'allowed_values' => 'Saber
Foil
Epee
',
'allowed_values_php' => '',
'op' => 'Save field settings',
'module' => 'text',
'widget_module' => 'optionwidgets',
'columns' =>
array (
'value' =>
array (
'type' => 'text',
'size' => 'big',
'not null' => false,
'sortable' => true,
'views' => true,
),
),
'display_settings' =>
array (
'label' =>
array (
'format' => 'above',
'exclude' => 0,
),
'teaser' =>
array (
'format' => 'default',
'exclude' => 0,
),
'full' =>
array (
'format' => 'default',
'exclude' => 0,
),
4 =>
array (
'format' => 'default',
'exclude' => 0,
),
2 =>
array (
'format' => 'default',
'exclude' => 0,
),
3 =>
array (
'format' => 'default',
'exclude' => 0,
),
'token' =>
array (
'format' => 'default',
'exclude' => 0,
),
),
),
9 =>
array (
'label' => 'USFA Rating',
'field_name' => 'field_rating',
'type' => 'text',
'widget_type' => 'text_textfield',
'change' => 'Change basic information',
'weight' => '13',
'rows' => 5,
'size' => '60',
'description' => 'If you have ratings in multiple weapons, please list them all.',
'default_value' =>
array (
),
'default_value_php' => '',
'default_value_widget' =>
array (
'field_rating' =>
array (
0 =>
array (
'value' => '',
'_error_element' => 'default_value_widget][field_rating][0][value',
),
),
),
'group' => 'group_fencing_information',
'required' => 0,
'multiple' => '0',
'text_processing' => '0',
'max_length' => '',
'allowed_values' => '',
'allowed_values_php' => '',
'op' => 'Save field settings',
'module' => 'text',
'widget_module' => 'text',
'columns' =>
array (
'value' =>
array (
'type' => 'text',
'size' => 'big',
'not null' => false,
'sortable' => true,
'views' => true,
),
),
'display_settings' =>
array (
'label' =>
array (
'format' => 'above',
'exclude' => 0,
),
'teaser' =>
array (
'format' => 'default',
'exclude' => 0,
),
'full' =>
array (
'format' => 'default',
'exclude' => 0,
),
4 =>
array (
'format' => 'default',
'exclude' => 0,
),
2 =>
array (
'format' => 'default',
'exclude' => 0,
),
3 =>
array (
'format' => 'default',
'exclude' => 0,
),
'token' =>
array (
'format' => 'default',
'exclude' => 0,
),
),
),
10 =>
array (
'label' => 'Significant Competitive Results',
'field_name' => 'field_significant_results',
'type' => 'text',
'widget_type' => 'text_textarea',
'change' => 'Change basic information',
'weight' => '14',
'rows' => '10',
'size' => 60,
'description' => '(JOs, NACs, etc)
Please include how many competitors there were in the event, what it was rated, and the date.
Example: 3rd/222 in Div2 Men\'s Foil, Summer Nationals 2007 ',
'default_value' =>
array (
),
'default_value_php' => '',
'default_value_widget' =>
array (
'field_significant_results' =>
array (
0 =>
array (
'value' => '',
'_error_element' => 'default_value_widget][field_significant_results][0][value',
),
),
),
'group' => 'group_fencing_information',
'required' => 0,
'multiple' => '0',
'text_processing' => '0',
'max_length' => '',
'allowed_values' => '',
'allowed_values_php' => '',
'op' => 'Save field settings',
'module' => 'text',
'widget_module' => 'text',
'columns' =>
array (
'value' =>
array (
'type' => 'text',
'size' => 'big',
'not null' => false,
'sortable' => true,
'views' => true,
),
),
'display_settings' =>
array (
'label' =>
array (
'format' => 'above',
'exclude' => 0,
),
'teaser' =>
array (
'format' => 'default',
'exclude' => 0,
),
'full' =>
array (
'format' => 'default',
'exclude' => 0,
),
4 =>
array (
'format' => 'default',
'exclude' => 0,
),
2 =>
array (
'format' => 'default',
'exclude' => 0,
),
3 =>
array (
'format' => 'default',
'exclude' => 0,
),
'token' =>
array (
'format' => 'default',
'exclude' => 0,
),
),
),
11 =>
array (
'label' => 'Years of Experience',
'field_name' => 'field_years_of_experience',
'type' => 'number_float',
'widget_type' => 'number',
'change' => 'Change basic information',
'weight' => '15',
'description' => '',
'default_value' =>
array (
),
'default_value_php' => '',
'default_value_widget' =>
array (
'fie
Here is the rest of the export:
array (
'label' => 'Years of Experience',
'field_name' => 'field_years_of_experience',
'type' => 'number_float',
'widget_type' => 'number',
'change' => 'Change basic information',
'weight' => '15',
'description' => '',
'default_value' =>
array (
),
'default_value_php' => '',
'default_value_widget' =>
array (
'field_years_of_experience' =>
array (
0 =>
array (
'value' => '',
'_error_element' => 'default_value_widget][field_years_of_experience][0][value',
),
),
),
'group' => 'group_fencing_information',
'required' => 1,
'multiple' => '0',
'min' => '0',
'max' => '30',
'prefix' => '',
'suffix' => '',
'allowed_values' => '',
'allowed_values_php' => '',
'op' => 'Save field settings',
'module' => 'number',
'widget_module' => 'number',
'columns' =>
array (
'value' =>
array (
'type' => 'float',
'not null' => false,
'sortable' => true,
),
),
'display_settings' =>
array (
'label' =>
array (
'format' => 'above',
'exclude' => 0,
),
'teaser' =>
array (
'format' => 'default',
'exclude' => 0,
),
'full' =>
array (
'format' => 'default',
'exclude' => 0,
),
4 =>
array (
'format' => 'default',
'exclude' => 0,
),
2 =>
array (
'format' => 'default',
'exclude' => 0,
),
3 =>
array (
'format' => 'default',
'exclude' => 0,
),
'token' =>
array (
'format' => 'default',
'exclude' => 0,
),
),
),
12 =>
array (
'label' => 'Club',
'field_name' => 'field_club',
'type' => 'text',
'widget_type' => 'text_textfield',
'change' => 'Change basic information',
'weight' => '16',
'rows' => 5,
'size' => '60',
'description' => 'Name of club(s) at which you train, currently or in the past',
'default_value' =>
array (
),
'default_value_php' => '',
'default_value_widget' =>
array (
'field_club' =>
array (
0 =>
array (
'value' => '',
'_error_element' => 'default_value_widget][field_club][0][value',
),
),
),
'group' => 'group_fencing_information',
'required' => 0,
'multiple' => '1',
'text_processing' => '0',
'max_length' => '',
'allowed_values' => '',
'allowed_values_php' => '',
'op' => 'Save field settings',
'module' => 'text',
'widget_module' => 'text',
'columns' =>
array (
'value' =>
array (
'type' => 'text',
'size' => 'big',
'not null' => false,
'sortable' => true,
'views' => true,
),
),
'display_settings' =>
array (
'label' =>
array (
'format' => 'above',
'exclude' => 0,
),
'teaser' =>
array (
'format' => 'default',
'exclude' => 0,
),
'full' =>
array (
'format' => 'default',
'exclude' => 0,
),
4 =>
array (
'format' => 'default',
'exclude' => 0,
),
2 =>
array (
'format' => 'default',
'exclude' => 0,
),
3 =>
array (
'format' => 'default',
'exclude' => 0,
),
'token' =>
array (
'format' => 'default',
'exclude' => 0,
),
),
),
13 =>
array (
'label' => 'Coach',
'field_name' => 'field_coach',
'type' => 'text',
'widget_type' => 'text_textfield',
'change' => 'Change basic information',
'weight' => '17',
'rows' => 5,
'size' => '60',
'description' => 'Coach(es) with whom you have worked (currently or in the past)',
'default_value' =>
array (
),
'default_value_php' => '',
'default_value_widget' =>
array (
'field_coach' =>
array (
0 =>
array (
'value' => '',
'_error_element' => 'default_value_widget][field_coach][0][value',
),
),
),
'group' => 'group_fencing_information',
'required' => 0,
'multiple' => '1',
'text_processing' => '0',
'max_length' => '',
'allowed_values' => '',
'allowed_values_php' => '',
'op' => 'Save field settings',
'module' => 'text',
'widget_module' => 'text',
'columns' =>
array (
'value' =>
array (
'type' => 'text',
'size' => 'big',
'not null' => false,
'sortable' => true,
'views' => true,
),
),
'display_settings' =>
array (
'label' =>
array (
'format' => 'above',
'exclude' => 0,
),
'teaser' =>
array (
'format' => 'default',
'exclude' => 0,
),
'full' =>
array (
'format' => 'default',
'exclude' => 0,
),
4 =>
array (
'format' => 'default',
'exclude' => 0,
),
2 =>
array (
'format' => 'default',
'exclude' => 0,
),
3 =>
array (
'format' => 'default',
'exclude' => 0,
),
'token' =>
array (
'format' => 'default',
'exclude' => 0,
),
),
),
14 =>
array (
'label' => 'Other Fencing Accomplishments',
'field_name' => 'field_other_accomplishments',
'type' => 'text',
'widget_type' => 'text_textarea',
'change' => 'Change basic information',
'weight' => '18',
'rows' => '10',
'size' => 60,
'description' => '(Captain of team, other awards won, etc) ',
'default_value' =>
array (
),
'default_value_php' => '',
'default_value_widget' =>
array (
'field_other_accomplishments' =>
array (
0 =>
array (
'value' => '',
'_error_element' => 'default_value_widget][field_other_accomplishments][0][value',
),
),
),
'group' => 'group_fencing_information',
'required' => 0,
'multiple' => '0',
'text_processing' => '0',
'max_length' => '',
'allowed_values' => '',
'allowed_values_php' => '',
'op' => 'Save field settings',
'module' => 'text',
'widget_module' => 'text',
'columns' =>
array (
'value' =>
array (
'type' => 'text',
'size' => 'big',
'not null' => false,
'sortable' => true,
'views' => true,
),
),
'display_settings' =>
array (
'label' =>
array (
'format' => 'above',
'exclude' => 0,
),
'teaser' =>
array (
'format' => 'default',
'exclude' => 0,
),
'full' =>
array (
'format' => 'default',
'exclude' => 0,
),
4 =>
array (
'format' => 'default',
'exclude' => 0,
),
2 =>
array (
'format' => 'default',
'exclude' => 0,
),
3 =>
array (
'format' => 'default',
'exclude' => 0,
),
'token' =>
array (
'format' => 'default',
'exclude' => 0,
),
),
),
);
$content['extra'] = array (
'title' => '-5',
'menu' => '-4',
'attachments' => '-3',
);
Ok, after combining the two fragments (why did you split it? Is there a size limit to posts here?) and installing two missing CCK modules, I was able to import the content type into my local test instance just fine. Creating a node from it worked, as well as viewing it afterwards.
In short - can't reproduce :/
So something else must be wrong with your Drupal instance to cause this. I have no idea what this might be, but I'd start trying to import another (simpler) content type to see if your import functionality is generally broken or just for this specific import.
If the error occurs just for this import, my next try would be ignoring the import problem and trying to debug the 404 for recruiting_form content, as this could well be related and might be easier to debug. You could start by putting a
$trace = debug_backtrace();
into the drupal_not_found() function - either var_dump() its output or look at it using a debugger. The trace should point you to the function issuing the 404.
If you want to tackle the import problem, I'd start searching for the 'illegal choice' error message in your codebase (normally comes from general form validation) and check the state of things there - using a debugger and/or the trace statements, you might be able to pinpoint the cause for that error, which might give a hint on whats wrong.
Good Luck!
Believe the issue how the node type creation process is conducted with contrib modules.
The workaround is...
Create a new content type (just the name will do.)
Run your import (with the proper machine name) over the top of this stub content type.
Certainly worked for me with a big monster node type.

Resources