Posts tagged 'javascript'

Resolving an NS_ERROR_FILE_CORRUPTED error in Mozilla Firefox

I use Mozilla Firefox as my browser and occasionally I’ve found that certain resources (typically JavaScript or CSS files) may fail to load because of an error NS_ERROR_FILE_CORRUPTED, which is displayed in the console. For me, this is rarely seen, though I’ve experienced the issue a few times on Trello.com and another on our corporate website CMS. This has the effect of preventing whatever that resource was from loading, so in the case of CSS it won’t display and in the case of JS it won’t run. On Trello, this resulted in a fully broken …

Logged out users can’t bring up the Plone popup calendar

It’s another one of those ‘strange’ problems that has cropped up, but by default in Plone, users who aren’t authenticated aren’t actually able to bring up a pop-up calendar on a date field.

It’s amazing that I haven’t run into this issue before with something like PloneFormGen, where you’d think that a simple Date input field would be pretty common.  Although, I guess it’s the case that even though I’ve used these given forms, I’ve probably never taken much notice of the popup calendar icon and just selected a random date …

Plone: Re-ordering Folder Contents

Ahhh, a new work week.

The first perplexing puzzle for the week was a seemingly silly idea (it still is) in Plone where it allows you to view the contents of a given folder in batches of 20. Now, combine this concept (which is good) with a concept of being able to re-order items within the folder (which is good too), you end up with not being able to move items between ‘batches’.

Troublesome. There’s nothing obvious that you can do aside from disabling your browser’s JavaScript and using the manual buttons. Nope: not feasible.

Try making your …

Plone: Page Template Redirects

Was wondering how to get a Plone page template to go to a page before the template actually loads. Now, actually getting Plone to not go to this template would be FAR better, but since we can’t actually modify the functionality of the Favourites content items in the content listings (not easily), I instead modify it’s default view.

Using this:

<head>
    <metal:js fill-slot="javascript_head_slot">
        <script type="text/javascript"
        tal:content="python:'location.href=\''+portal.absolute_url()+'/'+here.remoteUrl+'\';;'">
        </script>
    </metal:js>
</head>

We see that the page reloads to the relevant location as soon as the head JavaScript …