tag:kete.lighthouseapp.com,2008-07-28:/projects/14740-acts_as_licensed/eventskete / acts_as_licensed Events2008-07-27T23:16:02Ztag:kete.lighthouseapp.com,2008-07-28:Event/375248722019-09-19T19:51:58+12:002019-09-19T19:51:58+12:00ElizabethPappasacts_as_licensed: Unhandled exception raised when no metadata exists for a license [#1]<div><p>Brilliant post! I can you this webpage topic to make the site
since I am the site designers but this <a href="https://www.ukbestessay.org/essay-services">https://www.ukbestessay.org/essay-services</a>
is the best option to manage the task. The standard of the topic is
additionally great and shade of the topic is likewise well.</p></div>tag:kete.lighthouseapp.com,2008-07-28:Event/16311602008-11-03T12:49:14+13:002008-11-03T12:49:15+13:00Jamesacts_as_licensed: Unhandled exception raised when no metadata exists for a license [#1]<li>State changed from <em class="change">“open”</em> to <em class="change">“resolved”</em></li>
<div><p>Changes have been made which now resolve this issue.</p>
<ol>
<li>
<p>Meta-data is now generated automatically when none is provided
by an administrator. This includes an IMG tag only when an
image_url is provided.</p>
</li>
<li>
<p>Validates have been added to ensure name, url, is_available and
is_creative_commons fields are always entered.</p>
</li>
</ol>
<p>See <a href="http://github.com/kete/acts_as_licensed/commit/f38155bfab707ae65d23c030986227e9c4158a7b">
http://github.com/kete/acts_as_l...</a> for the latest commit
log.</p></div>tag:kete.lighthouseapp.com,2008-07-28:Event/16105622008-10-30T18:22:49+13:002008-10-30T18:22:49+13:00Jamesacts_as_licensed: Unhandled exception raised when no metadata exists for a license [#1]<li>State changed from <em class="change">“new”</em> to <em class="change">“open”</em></li>
<div><p>I've fixed this issue in acts_as_licensed master by adding logic
so that when no meta-data is provided, stub meta-data is generated
from the license name, URL, etc and used as the HTML output for the
license.</p>
<p>This still allows for custom license metadata and therefore
custom XHTML output, but also allows or cases where no metadata is
provided.</p>
<p>See <a href="http://github.com/kete/acts_as_licensed/commits/master">http://github.com/kete/acts_as_l...</a>
for details.</p></div>tag:kete.lighthouseapp.com,2008-07-28:Event/16099552008-10-30T15:15:22+13:002008-10-30T15:15:22+13:00Jamesacts_as_licensed: Unhandled exception raised when no metadata exists for a license [#1]<div><h2>Summary</h2>
<p>When a license with no metadata value present, and the license
is selected on an item (in Kete, for example), the acts_as_licensed
plugin causes an uncaught exception to be raised, resulting in a
error 500 in a production website.</p>
<h2>Stack trace</h2>
<pre><code>
ActionView::TemplateError (private method `gsub' called for nil:NilClass) on line #2 of topics/_license.html.erb:
1: <% cache_with_privacy(item, {:part => "secondary_content_license_metadata"}) do -%>
2: <% unless item.license_metadata.nil? -%>
3: <div class="secondary-content-section-wrapper">
4: <div id="license-box" class="secondary-content-section">
5: <div class="license"><%= item.license_metadata %></div>
vendor/plugins/acts_as_licensed/lib/acts_as_licensed.rb:55:in `license_metadata'
app/views/topics/_license.html.erb:2:in `_run_erb_47app47views47topics47_license46html46erb'
vendor/rails/actionpack/lib/action_controller/caching/fragments.rb:72:in `call'
vendor/rails/actionpack/lib/action_controller/caching/fragments.rb:72:in `fragment_for'
vendor/rails/actionpack/lib/action_view/template_handlers/erb.rb:50:in `cache_fragment'
vendor/rails/actionpack/lib/action_view/helpers/cache_helper.rb:36:in `cache'
app/helpers/application_helper.rb:795:in `cache_with_privacy'
</code></pre></div>tag:kete.lighthouseapp.com,2008-07-28:Event/9829182008-07-28T11:16:02+12:002008-07-28T11:16:02+12:00Kieran P[Page] acts_as_licensed: Home