BuzzingPixel

Ansel for Craft

Ansel for EE

Treasury

Construct

Category Construct

Dashboard (open an issue here)

All Issues

My Issues

News Contact
Log in

Logged in as

Licenses Purchases Profile Change Password Billing Portal Admin
Log Out
Software
Ansel for Craft Ansel for EE Treasury Construct Category Construct
Support
Dashboard (open an issue here) All Issues My Issues
News Contact
Log in
Logged in as:
Licenses Purchases Profile Change Password Billing Portal Log Out
Dashboard All Issues My Issues
Support Dashboard
  1. Home
  2. Home
  3. Support Dashboard
  4. View Issue

ansel returns a 500 error when trying to use grid data

#48 opened by saturn

Subscribe

Details

Duplicate

Public Issue

Visibility: Public
4 replies
Last reply by TJ Draper
Created 9/8/2017 12:49 PM
Updated 9/11/2017 6:59 PM
Ansel for ExpressionEngine 2.0.9
CMS Version: 3.5.10
PHP Version: 7.1.9

Description

getting a fatal error whether there's an image in the field or not. basically acts as if the data is null or corrupt.

PHP Fatal error: Uncaught Error: Call to a member function getUrlSafeParam() on null in /var/www/vhosts/tim/system/user/addons/ansel/Service/AnselImages/ImagesTag.php:368\nStack trace:\n#0 /var/www/vhosts/tim/system/user/addons/ansel/Service/AnselImages/ImagesTag.php(217): BuzzingPixel\Ansel\Service\AnselImages\ImagesTag->setVariablesFromRecord(Object(BuzzingPixel\Ansel\Record\Image))\n#1 /var/www/vhosts/tim/system/user/addons/ansel/Controller/Field/ImagesTag.php(121): BuzzingPixel\Ansel\Service\AnselImages\ImagesTag->getVariables()\n#2 /var/www/vhosts/tim/system/user/addons/ansel/ft.ansel.php(839): BuzzingPixel\Ansel\Controller\Field\ImagesTag->parse(Array, '\n\t<div id="temp...')\n#3 /var/www/vhosts/tim/system/ee/legacy/libraries/api/Api_channel_fields.php(409): Ansel_ft->grid_replace_tag('{"placeholder":...', Array, '\n\t<div id="temp...')\n#4 /var/www/vhosts/tim/system/ee/legacy/libraries/Grid_parser.php(700): Api_channel_fields->apply('grid_replace_ta...', Array)\n#5 /var/www/vhosts/tim/system/ee/legacy/libraries/Grid_parser.ph in /var/www/vhosts/tim/system/user/addons/ansel/Service/AnselImages/ImagesTag.php on line 368

Replies

  • saturn

    Replied 9/8/2017 12:50 PM, Edited 9/11/2017 6:59 PM

    this is the code I've attempted to use:

    {t2_top_image}
    	{t2_top_image:image}
    	&lt;div id=&quot;template_header&quot;&gt;
    		&lt;!-- Single Header --&gt;
    		&lt;div class=&quot;uk-cover-background uk-position-relative&quot; style=&quot;background-image: url(&#039;{img:url}&#039;);&quot;&gt;
    			&lt;img class=&quot;uk-invisible&quot; src=&quot;{img:url}&quot; width=&quot;100%&quot; height=&quot;650&quot; alt=&quot;{img:title}&quot;&gt;
    			&lt;!-- Optional Text --&gt;
    			&lt;div class=&quot;uk-position-cover uk-flex uk-flex-center uk-flex-middle&quot;&gt;
    				&lt;!-- Centered --&gt;
    				&lt;div class=&quot;uk-text-center&quot;&gt;
    					{if t2_top_image:cta_text != &#039;&#039; &amp;&amp; t2_top_image:cta_url != &#039;&#039;}
    						&lt;a href=&quot;{t2_top_image:cta_url}&quot; title=&quot;{t2_top_image:cta_text}&quot; class=&quot;uk-button uk-button-large&quot;&gt;{t2_top_image:cta_text}&lt;/a&gt;
    					{/if}
    				&lt;/div&gt;
    			&lt;/div&gt;
    		&lt;/div&gt;
    	&lt;/div&gt;
    	{/t2_top_image:image}
    {/t2_top_image}
    
  • saturn

    Replied 9/8/2017 2:09 PM, Edited 9/11/2017 6:59 PM

    See ticket from peter@hammerquiststudios.com

    We think this is a bug in the file manager in Ansel not syncing with the file manager in EE.

  • TJ Draper

    Replied 9/8/2017 10:34 PM, Edited 9/11/2017 6:59 PM

    Also a duplicate issue of 21, which I clearly have been negligent in addressing. I have, however, spent some time tracking it down and fixing it tonight. The fix will be in a forthcoming release that should be out by Monday at the latest.

    That said, I also do recommend trying to make sure source images don’t get deleted as the manipulated image becomes un-editable after the source image is deleted.

    I’d also like to point out that Ansel has no file manager so there is no syncing to be done. Ansel is not a file manager, it is only a field type that manipulates images. The only thing I can really do if a source file is deleted is catch errors and not throw them — which is what the fix that is forthcoming will do.

  • TJ Draper

    Replied 9/11/2017 6:59 PM

    Ansel 2.0.10 addresses this issue.

Use Markdown for formatting

Details

Duplicate

Public Issue

Visibility: Public
4 replies
Last reply by TJ Draper
Created 9/8/2017 12:49 PM
Updated 9/11/2017 6:59 PM
Ansel for ExpressionEngine 2.0.9
CMS Version: 3.5.10
PHP Version: 7.1.9
Cookie Policy
Privacy Policy
Terms of Service

© 2023 BuzzingPixel, LLC. All rights reserved.