Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
this clients site was working fine yesterday when I tested it after putting in the relation coding on the portfolio and gallery.php pages using this link: viewtopic.php?f=8&t=8559#p16293

Now he tells me that the file upload size is the issue but I know it's not as I have set it to 0 in the includes/fileupload/config.php file and in the cpanel it's set to 512MB for upload_max_filesize in cpanel

The php version is 7.0 and it's couchcms version 2.2 but 2.2 should work on php version 7 shouldn't it as was working fine yesterday

There are no errors in the cpanel error log so not sure what the issue is with the images, they are uploaded onto the server in couchcms/uploads/image/gallery/ folder as can see the files but on the cms side, they are not displayed for some reason. I have attached a screenshot of the issue

I have attached a second screenshot of when I click on the image so can add a caption to it, don't get what has happened since yesterday when it was working fine as I tested it

What else could it be?

The code I have in gallery.php is below

Code: Select all
<?php require_once'cms/cms.php'; ?>
<cms:template title='Gallery' clonable='1' dynamic_folders='1' gallery='1'>
   
    <cms:editable
    type='relation'
    name='photo_portfolio_images'
    masterpage='portfolio.php'
    has='one'
    no_gui='1'
    label='-'
/>
   
    <cms:editable
    type='textarea'
    name='caption'
    order='5'
    />
               
</cms:template>

<?php include ( 'includes/header.php' );?>

<section id="gallery-single-section" style="margin: 65px 0 0 0;">
<div class="isotope-wrap">
               
<div class="isotope col-4 gutter-3">
                  
<div id="gallery" class="isotope-items-wrap lightgallery gsi-color" data-lightgallery="group" data-lg-thumbnail="false">
                     
<div class="grid-sizer"></div>
<cms:if k_is_page >
<cms:reverse_related_pages 'photo_portfolio_images' masterpage='gallery.php' >
<div class="isotope-item">
                               
<a href="<cms:show gg_image />" data-lightgallery="item" class="gallery-single-item lg-trigger" data-sub-html="<p class='captions'><cms:show caption/></p>">
<img src="<cms:show gg_image />" class="gs-item-image"/>
  <div class="gsi-image-caption"><cms:show caption/></div>                                 
</a>
                               
</div>
</cms:reverse_related_pages>
</cms:if>
</div>

</div>
               
</div>
                   
</section>

<?php include( 'includes/footer.php' ); ?>
<?php COUCH::invoke(); ?>


In portfolio.php I have the following

Code: Select all
<?php require_once'cms/cms.php'; ?>

<cms:template title='Portfolio' clonable='1' nested_pages='1' order='7'>
   
    <cms:editable
    type='reverse_relation'
    name='portfolio_images'
    masterpage='gallery.php'
    field='photo_portfolio_images'
    anchor_text='View images'
    label='Gallery'
/>
   
</cms:template>

<section id="gallery-single-section" style="margin: 65px 0 0 0;">
<div class="isotope-wrap">
               
<div class="isotope col-4 gutter-3">
                  
<div id="gallery" class="isotope-items-wrap lightgallery gsi-color" data-lightgallery="group" data-lg-thumbnail="false">
                     
<div class="grid-sizer"></div>
<cms:if k_is_page >
<cms:reverse_related_pages 'photo_portfolio_images' masterpage='gallery.php' >
<div class="isotope-item">
                               
<a href="<cms:show gg_image />" data-lightgallery="item" class="gallery-single-item lg-trigger" data-sub-html="<p class='captions'><cms:show caption/></p>">
<img src="<cms:show gg_image />" class="gs-item-image"/>
<div class="gsi-image-caption"><cms:show caption/></div>
</a>
                               
</div>
</cms:reverse_related_pages>
</cms:if>
</div>

</div>
               
</div>
                   
</section>


I'm not sure if I need the gallery coding again in gallery.php as got it in portfolio.php but just kept it there for now and will remove it if it's not needed

Attachments

UPDATE: Just managed to get it working, I think some coding was missing from the gallery.php file
Below is the coding I now have and confirm it's working all ok

In gallery.php

Code: Select all
<?php require_once'cms/cms.php'; ?>
<cms:template title='Gallery' clonable='1' dynamic_folders='1' gallery='1'>
   
    <cms:editable
      name="gg_image"
      label="Image"
      desc="Upload your main image here"
      width="500"
      show_preview='1'
      preview_height='200'
      type="image"
   />

   <cms:editable
      name="gg_thumb"
      assoc_field="gg_image"
      label="Image Thumbnail"
      desc="Thumbnail of image above"
      width='115'
      height='115'
      enforce_max='1'
      type="thumbnail"
   />
   
    <cms:editable
    type='relation'
    name='photo_portfolio_images'
    masterpage='portfolio.php'
    has='one'
    no_gui='1'
    label='-'
/>
   
    <cms:editable
    type='textarea'
    name='caption'
    order='5'
    />
               
</cms:template>
<?php COUCH::invoke(); ?>


In portfolio.php

Code: Select all
<?php require_once'cms/cms.php'; ?>

<cms:template title='Portfolio' clonable='1' nested_pages='1' order='7'>
   
    <cms:editable
    type='reverse_relation'
    name='portfolio_images'
    masterpage='gallery.php'
    field='photo_portfolio_images'
    anchor_text='View images'
    label='Gallery'
/>
   
</cms:template>

<section id="gallery-single-section" style="margin: 65px 0 0 0;">
<div class="isotope-wrap">
               
<div class="isotope col-4 gutter-3">
                  
<div id="gallery" class="isotope-items-wrap lightgallery gsi-color" data-lightgallery="group" data-lg-thumbnail="false">
                     
<div class="grid-sizer"></div>
<cms:if k_is_page >
<cms:reverse_related_pages 'photo_portfolio_images' masterpage='gallery.php' >
<div class="isotope-item">
                               
<a href="<cms:show gg_image />" data-lightgallery="item" class="gallery-single-item lg-trigger" data-sub-html="<p class='captions'><cms:show caption/></p>">
<img src="<cms:show gg_image />" class="gs-item-image"/>
                                       
<div class="gsi-image-caption"><cms:show caption/></div>
                                       
</a>
                               
</div>
</cms:reverse_related_pages>
</cms:if>
</div>

</div>
               
</div>
                   
</section>
<?php include( 'includes/footer.php' ); ?>
<?php COUCH::invoke(); ?>


Hopefully that looks all ok, I am just glad it's working again
3 posts Page 1 of 1