Problems, need help? Have a tip or advice? Post it here.
7 posts Page 1 of 1
Hi,
Client made me to move my couch www from subdomain to domain and back again.
It resulted in missing images, please see this link:
http://test.softinet.com.pl/blog.php

What might be wrong:
I have this code in my blog.php:
Code: Select all
<?php define( 'K_TEMPLATE_NAME', 'blog.php' ); ?>
<?php require_once( 'couch/cms.php' ); ?>
<cms:template title="Blog" clonable="1">
    <cms:editable name="blog_content" type="richtext"/>

    <cms:editable name="blog_image"
                  crop="1"
                  width="900"
                  height="600"
                  type="image"
    />

    <cms:folder name="aktualnosci" title="Aktualności"/>
    <cms:folder name="szkolenia" title="Szkolenia"/>
   

<cms:globals>

    <cms:repeatable name='videos' >
           
      <cms:editable name='video' label='Video embed code' type='textarea' no_xss_check='1' >
            <iframe width = "100%" height = "auto" src="https://www.youtube.com/embed/fMf0mrVMGJk" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
      </cms:editable>
   
          <cms:editable name='videotitle' label='tytul' type='richtext' />
          <cms:editable name='videotext' label='videotext' type='richtext' />
    </cms:repeatable>
   
</cms:globals>
   
   
</cms:template>


and this one in blog-list.html:
Code: Select all
<!-- Post Image -->
                                    <div class="img-blog-list">
                                        <img class="img imgfix_top_container" alt="" src="<cms:show blog_image />"/>
                                    </div>
                                    <!-- Post Image end-->


                                    <div class="px-2">
                                        <!-- Post Title -->
                                        <h3 class="title"><a href="<cms:show k_page_link />">
                                            <cms:show k_page_title/>
                                        </a></h3>

                                        <!-- Post Content -->
                                        <cms:excerptHTML count='75' ignore='img'>
                                            <cms:show blog_content/>
                                        </cms:excerptHTML>


                                        <!-- Read More Button -->
                                        <a href="<cms:show k_page_link />" class="btn-primary-line">Czytaj</a>
                                        <!-- Read More Button end-->
                                    </div>


Please see also the view from couch cms - in attachement

Attachments

It is unlikely that the problem is with the code (I assume the same was working well previously).

Switching domains should not result in any kind of data loss. Are you sure you did not change the database info (in couch/config.php) during the switch?
Well, I changed only this line:
Code: Select all
   define( 'K_SITE_URL', 'http://test.softinet.com.pl/' );

as I needed to go back to subdomain.

Images disappear only after I open a single post and click save.
On frontend it shows unknown source of an image, like that:
src image.png
src image.png (4.27 KiB) Viewed 1416 times


.and I can see "download dump", what does it mean?
dump.png
dump.png (26.97 KiB) Viewed 1416 times
Hello,
@KK, do you think that downloading dump would fix the problem?
Will have to take a look at the problem first-hand to know the cause.
Please PM me the Couch+FTP creds if you'd like me to do that.
Thanks for the creds.

I had a look at the issue and found that a core file that renders the 'image' region (couch\theme\_system\field_image.html) was empty.

Replaced it with one from the installation zip and things appear to be normal now. Please check and verify.

That said, the file in question being empty would suggest the uploading process (during installation) probably messed up.
If that is correct, there could possibly be other files like this and you are likely to come across such inexplicable issues in the future, You'd be advised to do a full re-installation if this happens.
@KK, you can write a script to check integrity of all files - download zip from git, unpack it, get a hash for each file and recursively verify /couch folder.
7 posts Page 1 of 1
cron