Important announcements from CouchCMS team
63 posts Page 7 of 7
Previous 1 ... 3, 4, 5, 6, 7 Next
I properly managed to add the CSV Importer module to regular pages but now I was attempting to do so on cloned pages and fill out repeatable regions with it's help.

The issue I have right now is that it displays on the screen the entire content of the CSV but it only adds the last row as a repeatable region. It feels like capturing the existing data of the repeatable region back in "my_data" before adding a new one is not working but that does not really make sense.

I have simply made the following changes to the original code:

Code: Select all
<tr>
                <td><cms:show k_current_record /></td>
                <cms:csv_columns>
                    <td><cms:show value /></td>
                </cms:csv_columns>
            
            <cms:capture into='my_data' is_json='1'>
               <cms:show_repeatable 'all_items' as_json='1' />
            </cms:capture>
            
            <cms:capture into='my_data.' is_json='1'>
               {
                 "part_number" :<cms:escape_json><cms:show _pn /></cms:escape_json>,
                 "part_title" : <cms:escape_json><cms:show _title /></cms:escape_json>
               }
            </cms:capture>

                <!-- database operation here -->
                    <cms:db_persist
                        invalidate_cache='0'
                  _masterpage=k_template_name
                  _mode='edit'
                  _page_id=k_page_id
                        all_items=my_data
                    >
                        <cms:if k_error>
                            <strong style="color:red;">ERROR:</strong> <cms:show k_error/>
                        </cms:if>
                    </cms:db_persist>
                <!-- end database operation -->
            </tr>
KK wrote: @daldred
I'm seeing quite a lot of deprecations and warnings from PHP
I suppose you are not using the latest version of Couch, are you?
Please upgrade to it and let us know if you still hit those warnings.

ERROR function register_tag(): handler function of Tag "csv_reader" not callable
Once again, please use the latest version of this addon that is available from GitHub.
Let us know if the error persists.

Thanks.


@KK Sir,
Till the time we are working with php < v8 it is fine, but the moment we move to php > V8 (we are using V8.0.26) the issue crops up giving the message:
ERROR function register_tag(): handler function of Tag "csv_reader" not callable


Rest assured the CouchCMS version is latest (downloaded from github, day before yesterday.).

Regards,
GXCPL (CTR)
Image
where innovation meets technology
@genxcoders, could you please try using the version of CSV importer available here at GitHub? -
https://github.com/CouchCMS/CSV

Let me know if the error still crops up.
Thanks.
Previous 1 ... 3, 4, 5, 6, 7 Next
63 posts Page 7 of 7