Important announcements from CouchCMS team
230 posts Page 15 of 23
Previous 1 ... 12, 13, 14, 15, 16, 17, 18 ... 23 Next
Couldn't find anything. Here is the full code from the page I am testing 2.0 with:

Code: Select all
<?php require_once( '../couch/cms.php' ); ?>
<cms:template title='Product' clonable='1' dynamic_folders='1'>
   <cms:editable type='text' label='Old ID' desc='Please Ignore - Temporary Field' name='old_id'/><!-- will be deleted upon completion of importation -->
   <cms:editable type='text' name='product_title' label='Product Title' required='1' />
   <cms:editable type='text' name='product_name' label='Product Name' />
   <cms:editable type='text' name='product_sku' label='Product SKU' required='1' />
   <cms:editable type='text' name='product_size' label='Product Size' />
   <cms:editable type='richtext' name='product_desc' label='Product Description' toolbar='full' css='/css/style.css' />
   <cms:editable type='text' name='product_gallery_price' label='Product Gallery Price' />
   <cms:editable type='text' name='product_gallery_takeaway_price' label='Product Discounted Price' required='1' />
   <cms:editable type='textarea' name='product_tags' label='Product Tags' des='separate with a single space' />

   <cms:editable anchor_text='View/Add Images' desc='Save page to enable gallery link' field='image_product' label='Gallery' masterpage='includes/product-gallery.php' name='product_images' type='reverse_relation'/>

   <cms:config_list_view orderby='weight' order='desc'>
      <cms:field 'k_selector_checkbox' />
      <cms:field 'k_page_title' sortable='1' />
      <cms:field 'k_comments_count' />
      <cms:field 'k_page_foldertitle' />
      <cms:field 'k_up_down' />
      <cms:field 'k_page_date' />
      <cms:field 'k_actions' />
   </cms:config_list_view>
   <cms:config_list_view  searchable='1' />
</cms:template>
<cms:if k_is_page>
@tonjaggart

Hi Jon, please try this code:

Code: Select all
<?php require_once( '../couch/cms.php' ); ?>
<cms:template title='Product' clonable='1' dynamic_folders='1'>
   <cms:editable type='text' label='Old ID' desc='Please Ignore - Temporary Field' name='old_id'/><!-- will be deleted upon completion of importation -->
   <cms:editable type='text' name='product_title' label='Product Title' required='1' />
   <cms:editable type='text' name='product_name' label='Product Name' />
   <cms:editable type='text' name='product_sku' label='Product SKU' required='1' />
   <cms:editable type='text' name='product_size' label='Product Size' />
   <cms:editable type='richtext' name='product_desc' label='Product Description' toolbar='full' css='/css/style.css' />
   <cms:editable type='text' name='product_gallery_price' label='Product Gallery Price' />
   <cms:editable type='text' name='product_gallery_takeaway_price' label='Product Discounted Price' required='1' />
   <cms:editable type='textarea' name='product_tags' label='Product Tags' des='separate with a single space' />

   <cms:editable anchor_text='View/Add Images' desc='Save page to enable gallery link' field='image_product' label='Gallery' masterpage='includes/product-gallery.php' name='product_images' type='reverse_relation'/>

   <cms:config_list_view orderby='weight' order='desc' searchable='1'>
      <cms:field 'k_selector_checkbox' />
      <cms:field 'k_page_title' sortable='1' />
      <cms:field 'k_comments_count' />
      <cms:field 'k_page_foldertitle' />
      <cms:field 'k_up_down' />
      <cms:field 'k_page_date' />
      <cms:field 'k_actions' />
   </cms:config_list_view>

</cms:template>
<cms:if k_is_page>



The problem in your code was that you had two
<cms:config_list_view>
tags, one self-closing and the other with your fields in. You only need one tag - I imagine this will fix the problem but do let us know.
Image
Same error
Hmm very strange. I think @KK may be correct then, perhaps recently you had an editable region named "searchable" ?
Image
Really strange. Haven't found any editable field with that name.
@tonjaggart, please PM me the FTP+Couch access creds to your site and I'll take a look at the issue.
@tonjaggart, thanks for entrusting me with the creds.

I had a look and found that it wasn't a template specific problem (as it appeared from your description).
Rather, it was a site-wide problem - both the admin-panel as well as the front-end.
Basically, anywhere Couch was invoked, it displayed the error
"Could not successfully run query: Duplicate column name 'searchable'".

From the message it was apparent that Couch was trying to create a column named 'searchable' (but that column happened to be already present in the database).

The creation of columns happens (only once) while updating from one Couch version to the next. The 'searchable' column was supposed to be created while going to v1.4.5 from a lower version.

I used phpMyAdmin to take a look at the 'couch_settings' table's 'k_couch_version' key to see which version was recorded there. I found it to be '1.4.5RC2'. It should actually have been '2.0.beta' (this value can be had from couch/header.php).

Taking a look at other tables, I found that they had the columns that 2.0 was supposed to have.
So, it would seem, that the original update had happened properly but later on (most likely because you accessed the database using a previous version of Couch installed elsewhere), the version number got erroneously changed to a lower number.

This was making Couch to try and update once again to v2.0 but to fail as the tables were already updated.

SOLUTION:

To resolve the issue I manually changed the value of 'k_couch_version' key in 'couch_settings' table to the correct 2.0.beta and the error was gone and I could get the login prompt.

So that basically closes the issue you reported. I have spelled out all the details as, perhaps, it might help others.

What follows now is a totally different issue from the version mismatch above.
I am also spelling it out here as this is also something that someone might encounter.

When now I logged-in and tried to access the admin-panel, I received a very different error message -
ERROR: Tag "input" 'name' contains invalid characters. (Only lowercase[a-z], numerals[0-9] hyphen and underscore permitted

This is the Databound form complaining about some invalid character in one of its inputs (as you know, in v2.0 the admin-panel is made up of DataBound forms).

Basically when accessing the admin-panel without specifying explicitly which template to show (as usually happens from the login box), Couch tries to show you the very first registered template. In this case, that template (index.php) had some error and this, seemingly, locked us out completely from the admin-panel.

For such cases, we can access the admin-panel by explicitly specifying a template that is known to be error-free. The best bet would be to use a core section (e.g. the 'Users' section). I did that by using the following URL -
http://yoursite.com/couch/?o=users&q=list

and now I could get into the admin-panel and see the templates listed in the sidebar.

I tested all templates by clicking on them. Most are loading fine but some are throwing the same DBF error.
To assist you, I have rectified one of the problem templates (index.php) as given below. You can do the same for other templates.

I opened index.php in my text editor and searched for all 'name' attributes. I was looking for input names that had invalid characters (as the message stated, only lowercase[a-z], numerals[0-9] hyphen and underscore are permitted).

I spotted the following -
Code: Select all
<cms:repeatable name='Slider' >

The 'name' had a *capital* character that was causing the problem. I changed it to lowercase to make it -
Code: Select all
<cms:repeatable name='slider' >

Visited the changed template as super-admin to persist the change and now the admin-panel had no problem in displaying it.

Hope it helps.
Hi, I have two questions for version 2:
1 - Whether there is a limit to the content block <cms:html> content block </cms:html>?
I use this block tag with <cms:show_info > but I notice that there is a limit to the volume of standard content then ceases to show everything.

2 - Why tag cms:admin_link does not work in tag folders?
<cms:folders masterpage='blog.php' >
<a href="<cms:admin_link />" >
<cms:show k_folder_title />Edit folder
</a>
</cms:folders>

Thanks in advance ;)
@orbital,

1. I don't think there is any such limit for <cms:html>.
Please take a look at the generated source (view:source) to see if the complete contents are outputted or not.
Perhaps the cutoff is happening due to some CSS style? In which case, you can try overriding the style.

2. The <cms:admin_link> only leads to either the 'page-view' (i.e. edit screen of the pag in admin-panel) or the 'list-view' (i.e. the main listing showing all pages of the template in question). It does not cover the 'folder-view', I'm afraid.

Hope that answers your query.
@KK is there a way to search unpublished pages in the admin panel?
Previous 1 ... 12, 13, 14, 15, 16, 17, 18 ... 23 Next
230 posts Page 15 of 23

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 2 guests