Important announcements from CouchCMS team
80 posts Page 4 of 8
Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
@Jiwa, I'd like to take a look at the issue first-hand.
If your setup is online, please PM me the FTP+Couch creds,
@Jiwa, thanks for the creds.

I had a look and found that 'session' variables are not working for your site.
This could lead to several problems - the one you reported for mosaic being one of them.

Common reason for session not working are the tmp folder used by your web-server being full or it having the wrong permissions.

The resolution would be to contact your web host letting him know about the issue and asking him to make session work again.

That said, it wasn't really essential for mosaic to use the session variables so I decided to make some changes and make it work without them (this removes one potential point of failure). I have committed the changes to GitHub. Your installation is already working now so you don't necessarily have to apply the fix.

In closing, please let me reiterate - this particular issue is fixed for your setup but there could be other issues stemming from session not working (e.g. cart will definitely not work - as would flash variables). So, you'll still need to contact your provider.

Hope it helps.
Thank you so much for the help and so quick detailed answer, KK. You relieved me of the headache. :)
Thanks KK for amazing Mosaic :)
I use the Mosaic on a cloned page to generate a different design - for a product or service, this works very well:

Code: Select all
    <cms:mosaic name='design' label='Design product or service'>
        <cms:tile name='skin1' label='Design products'>
           set of product design regions
        </cms:tile>

        <cms:tile name='skin2' label='Design services'>
           set of services design regions
        </cms:tile>
    </cms:mosaic>


But how can I limit the creation of only one tile in a mosaic? The admin must be able to create only one design - only one tile.
Is this possible?
And a second question - how to use Color Picker region in a repeatable region placed in mosaic?

Thank you
Thanks @orbital :)

Replying to your queries -
1. I am afraid but for now there is no automatic check for the number of tile that can be created.
The user will have to use her own discretion if, e.g., only one tile is to be created.

2. There is, as you know, no official editable region for colors. There are some threads around that show how to cobble up one though. I think any technique using type 'message' to inject custom JS/CSS should work with mosaic (assuming it also works with normal templates).
Thanks KK,
About limiting the number of tiles in one mosaic (in an admin panel) I fully agree with you that the administrator can track the number of tiles. Let me ask, is it possible some sort of validator, for example:
Code: Select all
    <cms:mosaic name='content' label='Content' validator='max_tiles=4'>
            ... ...
    </cms:mosaic>

This would be very useful

About no official editable region for colors ...this works well in the mosaic (trivial use)
Code: Select all
   <cms:editable name='ivan' label='Color' type='text' order='1' >#2f5499</cms:editable>
   
   <cms:editable name='color_picker1' type='message' order='2' >
   <script type="text/javascript" src="<cms:show k_site_link/>panel/addons/jscolor/jscolor.js"></script>
   <script type="text/javascript">new jscolor.color(document.getElementById('f_ivan'), {});</script>
   </cms:editable>   


But the problem is that it does not work in repeatable
Code: Select all
   <cms:repeatable name='products' label='Prodcts' >         
   
   <cms:editable name='product_color' label='Product color' type='text' order='1' >#2f5499</cms:editable>
   
   <cms:editable name='color_picker_products' type='message' order='2' >
   <script type="text/javascript" src="<cms:show k_site_link/>panel/addons/jscolor/jscolor.js"></script>
   <script type="text/javascript">new jscolor.color(document.getElementById('f_product_color'), {});</script>
   </cms:editable>         
            
</cms:repeatable>


I think the problem is in the ID f_product_color because in the repeating region this number is dynamic, but f_product_color-0-products also does not work.
KK, I ask for some help
Thank you
Running couch 2 from download page. Used "git clone" to get latest 2.1 beta. Renamed old couch dir, placed new couch dir in it's location. Copied over addons directory and config file.

What I see now is:

Could not successfully run query: Duplicate column name 'ref_count'
@normis,

I downloaded and setup the current version of Couch available from our site just now.
Then I downloaded the version available from GitHub and replaced the 'couch' folder of the first installation with this one (using the config file of the first).

The upgrade went absolutely smoothly with no problems whatsoever.

Also, there has been no such issue reported before you from anyone.
So, I can safely say that there is no problem per se in v2.1 of GitHub.

That said, I am not denying the fact that you are indeed facing this problem.
I am not sure about the cause but it could be some local botch up at the time of installation.

So let us try and fix that.
In the 'couch' folder you'll find a file named 'upgrade.php'.
Please open it in your text editor and find the following block of code (it is at the very end of the file) -
Code: Select all
    // upgrade to 2.1.beta
    if( version_compare("2.1.beta", $_ver, ">") ){
        $_sql = "ALTER TABLE `".K_TBL_PAGES."` ADD `ref_count` int DEFAULT '1';";
        $DB->_query( $_sql );

        $_sql = "ALTER TABLE `".K_TBL_TEMPLATES."` ADD `deleted` int(1) DEFAULT '0';";
        $DB->_query( $_sql );

        $_sql = "ALTER TABLE `".K_TBL_TEMPLATES."` ADD `has_globals` int(1) DEFAULT '0';";
        $DB->_query( $_sql );

        $_sql = "CREATE INDEX `".K_TBL_PAGES."_Index24` ON `".K_TBL_PAGES."` (`status`, `ref_count`, `modification_date`);";
        $DB->_query( $_sql );
    }

As you can see, there are 4 pairs of statements.
It is the first pair that seems to be throwing the error.
Please comment that out (i.e. the two lines) to make the code as follows -.
Code: Select all
    // upgrade to 2.1.beta
    if( version_compare("2.1.beta", $_ver, ">") ){
        //$_sql = "ALTER TABLE `".K_TBL_PAGES."` ADD `ref_count` int DEFAULT '1';";
        //$DB->_query( $_sql );

        $_sql = "ALTER TABLE `".K_TBL_TEMPLATES."` ADD `deleted` int(1) DEFAULT '0';";
        $DB->_query( $_sql );

        $_sql = "ALTER TABLE `".K_TBL_TEMPLATES."` ADD `has_globals` int(1) DEFAULT '0';";
        $DB->_query( $_sql );

        $_sql = "CREATE INDEX `".K_TBL_PAGES."_Index24` ON `".K_TBL_PAGES."` (`status`, `ref_count`, `modification_date`);";
        $DB->_query( $_sql );
    }

Visit the admin-panel again.
Chances are that you'll get another error - this time complaining about the field being created by the next pair of statements (i.f the field named 'deleted'). If that happens, comment out those two lines also. If not, the installation will complete anyway.

This could (or could not) happen for the remaining two pairs also. Proceed the way we did above till the installation completes.

Hope this helps. Do let me know.
Sorry for taking so long to reply. Yes, all four of those statements threw an error about being duplicate. Uncommented them, and then it launched fine.
Everything seems to be working except when I try to save the post in the admin panel. This error comes up after saving:

Code: Select all
ERROR: Tag "db_persist_form" needs to be within a Data-bound form


Uploading images to a gallery had no issues, this comes up only after changing text in one of the richtext forms.

EDIT: Fixed it. Apparently I hadn't properly overwritten one of the addon folders!
Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
80 posts Page 4 of 8