I am using the MediaProcessing Module in Orchard V1.7. The source images are large TIFF files (typically up to 4928 x 3264 pixels). I have two filters set up on the image profile:
Resize to 200 x 200
Format the image to Jpg
When I display the page I get an exception logged
2013-08-12 16:30:55,982 [22] Orchard.MediaProcessing.Shapes.MediaShapes - An error occured while rendering shape Lightbox for image /OrchardLocal/Media/Default/Stamps%20of%20Australia/ClaytonTremlett244.tif
ImageResizer.Plugins.Basic.SizeLimits+SizeLimitException (0x80004005):
The dimensions of the output image (2668x3364) exceed the maximum permitted dimensions of 3200x3200.
ImageResizer documentation states that the default maximum file size for output is 3200 x 3200, but I am requesting a size of 200 x 200. I have logged this as an issue (1642).
My question is, does anyone know how to turn off the maximum file size limit check for ImageResizer when it is used through the ImageResizer managed API, as Orchard has chosen to do?
Make sure you resize first, then change the format.
You can do it by setting "totalBehavior" to "ignorelimits". You can also set up totalWidth/totalHeight.
http://imageresizing.net/plugins/sizelimiting
In your web.config/app.config add below sections (or change them if they exist):
<configuration>
<configSections>
....
<section name="resizer" type="ImageResizer.ResizerSection"
requirePermission="false" />
</configSections>
<appSettings>
....
</appSettings>
<resizer>
<pipeline fakeExtensions=".ashx" defaultCommands="autorotate.default=true"/>
<plugins>
<add name="DiskCache" />
<add name="SizeLimiting" />
....
</plugins>
<sizelimits totalBehavior="ignorelimits" />
</resizer>
...
Related
IIS compression has been enabled:
The following is the httpCompression tag of web.config:
<httpCompression
directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files"
minFileSizeForComp="1"
staticCompressionIgnoreHitFrequency="true"
dynamicCompressionIgnoreHitFrequency="true">
<dynamicTypes>
<add mimeType="*/*" enabled="true" />
</dynamicTypes>
<staticTypes>
<add mimeType="*/*" enabled="true" />
</staticTypes>
</httpCompression>
I see only CSS and JavaScript files are compressed when running the web app:
Unfortunately, other files are not compressed:
I do not seee "IIS Temporary Compressed Files" in "C:\inetpub\temp".
Could anyone provide a tip on how to diagnose this?
Update[2020-08-13]
Configuration Editor on Windows Server 2016:
Update[2020-08-13]
Per #Kul-Tigin, Dynamic Content Compression needs to be installed:
There's no such a setting named dynamicCompressionIgnoreHitFrequency, remove it.
1 (in bytes) for minFileSizeForComp is a little bit harsh. Compressing small files just decreases the response size.
Leave it 2700 as default.
Unlike setting values on attributes (like you did in staticCompressionIgnoreHitFrequency="true"), adding a setting as node won't override inherited ones.
Before adding, removing possibly inherited corresponding setting or clear all the inherited ones is a good practice to prevent errors (especially silent ones).
Otherwise an error may occur or worse a silent error may break your setting.
100 (in MB) for per application pools space limit may be insufficient for your needs. If I recall correctly most of your files are webassembly files of megabaytes.
Since you want all files to be compressed if possible; specify a value big enough.
Big as if possible; the sum of the uncompressed lengths of all your files. Say 2048 MB.
With this way you can't reach the disk space limit so none of your compressed caches are not deleted due to lack of space.
As long as the original file has not changed, the compressed caches survive and be delivered.
I have 3 years old compressed cache files stored on my servers, ready to be delivered BTW.
So, give the following a try.
If it does not work, please provide more information about request headers and the files that are delivered as uncompressed.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpCompression
sendCacheHeaders="false"
directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files"
doDiskSpaceLimiting="true"
maxDiskSpaceUsage="2048"
minFileSizeForComp="2700"
noCompressionForHttp10="true"
noCompressionForProxies="true"
noCompressionForRange="true"
staticCompressionIgnoreHitFrequency="true"
staticCompressionDisableCpuUsage="100"
staticCompressionEnableCpuUsage="50"
dynamicCompressionDisableCpuUsage="90"
dynamicCompressionEnableCpuUsage="50"
dynamicCompressionBufferLimit="65536">
<dynamicTypes>
<clear />
<add mimeType="*/*" enabled="true" />
</dynamicTypes>
<staticTypes>
<clear />
<add mimeType="*/*" enabled="true" />
</staticTypes>
</httpCompression>
</system.webServer>
</configuration>
I am trying to override default picture converter in Nuxeo.
By default, Nuxeo provides following OOTB converters
Thumbnail
Small
Medium
Large
Orignal
I want to reduce the converters to
Thumbnail
Orignal
Following are the configurations that I have tried
Created a Multi-Module Contribution using Nuxeo-cli utility
Steps followed to create contribution
$>nuxeo bootstrap multi-module
$>nuxeo bootstrap contribution
target component used for contribution is org.nuxeo.ecm.platform.picture.ImagingComponent
$>nuxeo bootstrap package
Added following extension to the OSGI-INF/picture-conversion-core-contrib.xml file Ref
<?xml version="1.0"?>
<component name="org.nuxeo.ecm.platform.picture.ImagingComponent.default.config.override">
<require>
org.nuxeo.ecm.platform.picture.ImagingComponent.default.config
</require>
<extension target="org.nuxeo.ecm.platform.picture.ImagingComponent" point="pictureConversions">
<pictureConversion chainId="Image.Blob.Resize" description="Thumbnail size" id="Thumbnail" maxSize="100" order="0" rendition="true"/>
<pictureConversion chainId="Image.Blob.Resize" description="Original jpeg image" id="OriginalJpeg" order="100" rendition="true"/>
</extension>
</component>
I want to keep only two picture conversions hence adding only Thumbnail converter and OriginalJpeg converter.
After creating package I am installing the package on Nuxeo server with following command.
$>nuxeoctl mp-install /path/to/dir/sample_picture_converter-package-1.0-SNAPSHOT.zip
Even though the component is installed correctly on the Nuxeo server, the server is converting the images with default formats(ie. Thumbnail, Small, Medium, Large and Original).
What are the steps to override a default contribution in Nuxeo without Nuxeo studio?
Cross Posted on Nuxeo forum
We need to disable the default picture conversions explicitly in OSGI-INF/picture-conversion-core-contrib.xml. Given below the updated OSGI configuration.
<?xml version="1.0"?>
<component name="org.nuxeo.ecm.platform.picture.ImagingComponent.default.config.override">
<require>
org.nuxeo.ecm.platform.picture.ImagingComponent.default.config
</require>
<extension target="org.nuxeo.ecm.platform.picture.ImagingComponent" point="pictureConversions">
<pictureConversion chainId="Image.Blob.Resize" description="Thumbnail size" id="Thumbnail" maxSize="100" order="0" rendition="true"/>
<pictureConversion chainId="Image.Blob.Resize" description="Original jpeg image" id="OriginalJpeg" order="100" rendition="true"/>
<pictureConversion chainId="Image.Blob.Resize" id="Small" enabled="false" />
<pictureConversion chainId="Image.Blob.Resize" id="Medium" enabled="false" />
<pictureConversion chainId="Image.Blob.Resize" id="FullHD" enabled="false" />
</extension>
</component>
Answered by LaraGranite on Nuxeo forum
So I have empty package where is stored local.xml
(Paths I don't describe here, all caches disabled, error logs turned on).
I've added static block in admin panel. It is named "two_level_links".
Then I added code to local.xml:
<?xml version="1.0"?>
<layout version="0.1.0">
<default>
<reference name="header">
<remove name="top.links"/>
<block type="cms/block" name="topTwoLevelLinks">
<action method="setBlockId">
<block_id>two_level_links</block_id>
</action>
</block>
</reference>
</default>
</layout>
In the header phtml file call it:
<?php echo $this->getChildHtml('topTwoLevelLinks') ?>
top.links disappeared but topTwoLevelLinks didn't appear.
Then I looked at Mage_Core_Model_Layout_Update and set a var_dump for getFileLayoutUpdatesXml [$layoutXml]. The source has my block.
Cannot understand what I should do next. How to debug it? Or where I'm doing wrong?
everything looks fine, but let me suggest you to check next things:
Check in admin panel if your block is enabled.
If you have more than one store view, please check if you your block is associated to your current store view, that you see on the frontend
Check in which folder header.phtml file is placed. For example if you changed the header.phtml from your base theme folder "app/design/frontend/base/default", Magento never will know about it if you also have header.phtml in "app/design/frontend/custom_package/custom_theme/" ... if it is not clear enough, please read: http://www.magentocommerce.com/knowledge-base/entry/magentos-theme-hierarchy
In Sharepoint 2007, I have created a layout. As you know when the user creates a page he chooses a layout from a listbox.
When you select a different element in the listbox, there is a preview image that changes on the left.
I thought this was controlled by the node PublishingPreviewImage in the xml of the layout. I have verified that the image exists in that place.
It is not working.
The code I use is:
<File Path="TituloTextoCtrl.aspx" Url="TituloTextoCtrl.aspx" Type="GhostableInLibrary" IgnoreIfAlreadyExists ="TRUE">
<Property Name="PublishingPreviewImage" Value="~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/titulotextoctrl.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/titulotextoctrl.png" />
<Property Name="MasterPageDescription" Value="Plantilla Titulo+Texto+Control" />
<Property Name="ContentType" Value="Titulo+Texto+Control" />
<Property Name="PublishingAssociatedContentType" Value=";#Vialibre_ContentTypeGeneral;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF39005215cca003b74e479baa123eb1dc5702;#" />
</File>
You also need XML to provision the image:
<Module Name="MyPreviewImages" Url="_catalogs/masterpage" IncludeFolders="??-??" Path="" RootWebOnly="TRUE">
<File Url="titulotextoctrl.png" Name="Preview Images/titulotextoctrl.png" Type="GhostableInLibrary">
</File>
</Module>
first of all upload yor layout page image in site collection document library or picture libary. Then Go to site actions--> site settings-->Galleries-->master pages and pagelayouts-->. In pagelayouts you can see your new layoutpage.
choose edit properties of your layoutpage there you can see the properties of that layout page. There is one column called preview image, give the url of image there that you already uploaed in the docu libary. click on Ok, now you have got preview image of your layout page.
Thx to Rich Bennema and Hojo for answering, there are right, but at the same time, my problem is that this layouts were deployed, and when I deploy again changing the PublishingPreviewImage, the layout is not updating. So my problem was a problem of controlling events so that everytime that I deploy the layouts are recreated in case there is changes.
This I know because it has worked for new layouts.
So for those who try this. Use the code I have provided with the one of Rich Bennema to upload the image.
I'm trying to use Magento for my shopping cart and want to switch from a right col layout to left col. I've turned on ID/CLASS display on the Web Developer Toolbar in firefox, and am seeing ".main col2-right-layout", which i believe i must switch to ".main col2-left-layout", the alternate style is predefined. but running searches for files with the phrase "col2-right-layout" in them is only pulling up the style sheet. I am searching THE ENTIRE Magento directory. How is this possible? Not case sensitive, and I'm even searching hidden folders. How can it be?
**i have looked in that file, the div is not mentioned. **
Files are in app/layout/default/default/templates/page/
I've not got a dev copy of magento at home, thats all I can remember off the top of my head - will try and remember to confirm when at work.
If you want to swap the templates, you need to look in app/layout/default/default/layout/page.xml, plus some of the other xml files - the templates are defined there.
(Yes, magento's layout/templating system is complicated, and has a steep learning curve, but its worth it!)
col2-right-layout is mentioned in
app/design/frontend/base/default/template/page/2columns-right.phtml
or in Magento 1.3
app/design/frontend/default/default/template/page/2columns-right.phtml
If you want to swap the layout I'd suggest changing it in one of the layout xml files. For the shopping cart edit app/design/frontend/base/default/layout/checkout.xml
change
<checkout_cart_index translate="label">
<label>Shopping Cart</label>
<remove name="right"/>
<remove name="left"/>
<!-- Mage_Checkout -->
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
to
<checkout_cart_index translate="label">
<label>Shopping Cart</label>
<remove name="right"/>
<remove name="left"/>
<!-- Mage_Checkout -->
<reference name="root">
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>
</reference>
And similarly for the checkout page in the same file change
<checkout_onepage_index translate="label">
<label>One Page Checkout</label>
<!-- Mage_Checkout -->
<remove name="left"/>
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
</reference>
to
<checkout_onepage_index translate="label">
<label>One Page Checkout</label>
<!-- Mage_Checkout -->
<remove name="left"/>
<reference name="root">
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>
</reference>
As always it is better to make a copy of the file you are editing to your own theme.