diff --git a/blocks/calendar/index.js b/blocks/calendar/index.js
index 1ea53c3..b54a0f5 100644
--- a/blocks/calendar/index.js
+++ b/blocks/calendar/index.js
@@ -18,6 +18,7 @@ registerBlockType('cptda/calendar', {
keywords: [ __( 'posts', 'custom-post-type-date-archives' ), __( 'archive', 'custom-post-type-date-archives' ) ],
supports: {
align: true,
+ html: false,
},
edit,
save() {
diff --git a/blocks/components/post-types.js b/blocks/components/post-types.js
index 19a5e0f..56f5be9 100644
--- a/blocks/components/post-types.js
+++ b/blocks/components/post-types.js
@@ -95,15 +95,15 @@ export default function PostTypeSelect({
let help = '';
let invalidPostType = '';
- if (dateArchives && !isDateArchivePostType(postType)) {
+ if (!isPublicPostType(postType)) {
error = 'cptda-select-error';
- help = sprintf(__("The post type %s doesn't exist or doesn't have date archives.", 'custom-post-type-date-archives'), postType);
- help += ' ' + __('Please select another post type', 'custom-post-type-date-archives');
+ help = sprintf(__("The post type %s doesn't exist.", 'custom-post-type-date-archives'), postType);
+ help += ' ' + __('Please select another post type.', 'custom-post-type-date-archives');
invalidPostType = postType;
- } else if (!dateArchives && !isPublicPostType(postType)) {
+ } else if (dateArchives && !isDateArchivePostType(postType)) {
error = 'cptda-select-error';
- help = sprintf(__("The post type %s doesn't exist.", 'custom-post-type-date-archives'), postType);
- help += ' ' + __('Please select another post type', 'custom-post-type-date-archives');
+ help = sprintf(__("The post type %s doesn't have date archives.", 'custom-post-type-date-archives'), postType);
+ help += ' ' + __('Please select another post type or add date archives to this post type.', 'custom-post-type-date-archives');
invalidPostType = postType;
}
diff --git a/blocks/components/query-panel.js b/blocks/components/query-panel.js
index ee90767..eec7573 100644
--- a/blocks/components/query-panel.js
+++ b/blocks/components/query-panel.js
@@ -53,5 +53,4 @@ const typeOptions = [
{ value: 'postbypost', label: __('Post By Post') },
{ value: 'weekly', label: __('Weekly') },
{ value: 'yearly', label: __('Yearly') },
-
-];
+];
\ No newline at end of file
diff --git a/blocks/components/server-side-render.js b/blocks/components/server-side-render.js
index f4a0292..839b314 100644
--- a/blocks/components/server-side-render.js
+++ b/blocks/components/server-side-render.js
@@ -134,6 +134,7 @@ CPTDA_ServerSideRender.defaultProps = {
if ('Invalid post type' === response.errorMsg) {
let error = getPostTypeError(post_type, dateArchives);
if (error.length) {
+ error += ' ' + __('See the settings of this block for more information.', 'custom-post-type-date-archives');
errorMessage = ({errorMessage}
{error});
}
}
diff --git a/blocks/latest-posts/edit.js b/blocks/latest-posts/edit.js
index d6fe394..71a5393 100644
--- a/blocks/latest-posts/edit.js
+++ b/blocks/latest-posts/edit.js
@@ -82,7 +82,7 @@ class LatestPostsEdit extends Component {
dateArchives={false}
/>
setAttributes( { number: value } ) }
min={ 1 }
diff --git a/blocks/package.json b/blocks/package.json
index 6333614..c8cb14e 100644
--- a/blocks/package.json
+++ b/blocks/package.json
@@ -1,6 +1,6 @@
{
"name": "custom-post-type-date-archives-blocks",
- "version": "2.6.2-alpha",
+ "version": "2.7.0-beta1",
"license": "GPL-2.0-or-later",
"devDependencies": {
"@wordpress/components": "^8.4.0",