I have a problem with references to an image not updating in pages that are using that image.
This is the steps that the users are reporting
go to /siteadmin#/content/dam/
on the "new" dropdown menu, select "new file"
select an image file that is a different image but has the same name as a file that already exists
upload the file and when asked that a file already exists, choose replace
activate the file when the upload completes
The problem is that when I check pub I can see the image is updated, and if I navigate to the path of the image, for example:
pub1.mypub:4503/content/dam//my-image.png
I can see the new image I replaced the old one with
the problem is that pages that were referencing the image, specifically the image component, still shows the old image. I've check flush rules, checked workflows and nothing seems to work
The one thing I noticed is that in pages that are referencing the image the path is like this
/content//_jcr_content/my-component/my-component-parsys/columns/parsyscenter/image.img.jpg/1538602163986.jpg
so it seems the path it is using is like a generated path and not the same path as this one: pub1.mypub:4503/content/dam//my-image.png
im at a complete loss, I honestly do not know what else to check, has anyone ran into this and figured out how to fix it?
this is on aem 6.3
the problem is that in pubs the image being referenced in the component does not update, and since it does not update in pub, it never updates dispatcher
You can try activating the referenced pages after the image has been published. Since the page on publish has reference to the previous image.
Related
This is probably a dumb question, but I'm worried :
I have published a website on a server, then made some changes to a css file.
As the css file was already cached by my browser, it didn't display the changes.
deleting the cash allowed to display the changes.
Now my worry is that if some users have previously been to the website, and it is cached by their browser, if I make a change they wouldn't be able to see it.
How do you guys prevent this ? Do you just change the file names ?
Sorry for my noobness,
Thanks.
There are a number of solutions floating around the web, but as far as I can tell they all boil down to changing the CSS filenames whenever their content changes. That way you steer clear of user caches and server caches serving old content.
Variants:
Instead of changing the name of the file itself, create a symbolic link with a new name to the old file whenever content changes.
Instead of changing the name of the file, change the way it is referenced by the page. Replacing myfile.css?v=1 by myfile.css?v=2 circumvents people's caches.
Write code that automatically changes the name or the link name or the way the file is referenced
Use a framework that does one of the above.
And: remember that the same problem applies to any content that might be cached, like JS files.
Im creating the UI of my application from a PSD file following the instructions in: https://www.codenameone.com/blog/psd-to-app-revisited.html (by using the css support plugin), everything is fine, but i edited one of the images in photoshop and exported it again to my codenameone folder(replacing the original image) and i thought the new image would replace the original one, but the application is still showing the old image(it seems as it is cached or something similar).
I already tried "Clean and build project" but didnt worked, also went to the generated .res file and tried to delete the original image but it says i must first delete the themes that use them(which i dont want to do). Is there any way to "refresh" the images referenced in the .res file so they reflect the latest image in the folder? or a "clear cache" or something similar. For now i renamed the image, and also changed the name in the css,but i think is not the best way cause that implies creating new names for your images, and editing your css with every little change.
If you change the image directly in the file system you need to do this when the designer is closed. Then reopen the designer res file and save it so the image is updated.
I have just started exploring the possibility of saving changes made to a page and it's styling in Chrome Dev Tools on the fly.
I've followed this short video tutorial on mapping the project files on disk to the Dev Tools via the Sources tab. Everything works fine until around the 5:17 point where he selects an element in the Elements tab and makes several CSS style changes which automatically persist to the file on disk.
This doesn't work for me. The changes won't save to the file and when I refresh the page reverts to the original styles. I have checked to see if there is an asterisk beside the corresponding CSS file in the Sources panel, to denote changes have been made, but there is nothing there.
I have also tried the solution posted in this SO question but I don't see the link to the stylesheet after editing the style in the Elements tab that will redirect back to the file in the Sources tab allowing the changes to be saved.
Can anyone tell me what I am missing? Thanks!
You need to make sure you map your Workspace to a Network Resource to persist changes automatically. I have produced the steps below to get this working correctly.
Select the folder in Sources and click 'Add Folder to Workspace'
If you open up our stylesheet in Sources and go to the Elements panel to make changes, upon coming back you will see a separate instance of the stylesheet opened with pending changes. The reason is that Chrome doesn't know how to map the URL to the file on your system yet.
Select 'Map to Network Resource...'. You will notice that 'top' disappears.
Make a change in the Elements panel now. When you go back to the Sources panel, the changes will automatically be shown without requiring any explicit save.
You can see exactly what was done by going to the Workspaces section of the DevTools settings panel. We've added a local Workspace, and then mapping the URL, which in my case is on my computer and accessed with the file:// protocol, to the relative path on the system.
The new TinyMCE 4.3 Image Tools (eg when cropping) saves images as blob data instead of image files in a directory. the edited mage url is like
blob:http://www.example.com/f2953aa1-e64f-49e1-a6e3-a283986663bf
I want to upload the image file to a specific folder and then use it as regular image referance / path.
Note
The question I am going to put is similar to Image edit issue. but the answer to this question is not working. I also tried http://archive.tinymce.com/forum/viewtopic.php?id=35740 solution but not working because it produces always same name image name.
The basic process is that TinyMCE will create a separate HTTP POST for each image that you modify with the image editor. It will send that image to a URL of your choosing (via HTTP POST) based on the setting of the images_upload_url option in your init.
The image handler at the URL referenced in the images_upload_url (which you have to create) has to do whatever needs to be done to "store" the image in your application. That could mean something like:
Store the item in a folder on your web server
Store the item in a database
Store the item in an asset management system
...regardless of where you choose to store the image your image handler needs to return a single line of JSON telling TinyMCE the new location of the image. As referenced in the TinyMCE documentation this might look like:
{ location : '/uploaded/image/path/image.png' }
TinyMCE will then update the image's src attribute to the value you return. If you use the images_upload_base_path setting in the init that will be prepended to the returned location. The TinyMCE page has more details on all of this:
https://www.tinymce.com/docs/advanced/handle-async-image-uploads/
The net here is that TinyMCE knows when an embedded image exists in your content but it can't possibly know what to do with that image in the context of your application so that job (the "image handler") is something you must create.
I am getting a very weird problem when attempted to cut-and-paste folders from one place to another in our intranet Plone site. The paste operation returned the error "Nothing in the clipboard". However it had gone and removed the folder from where it had originally been, and it looks as though it hasn't been inserted yet into the new location. Showing the Content view of the folder in which the paste happened does not show the pasted folder. However, through the ZMI interface I can see that the paste has happened. Clearly something threw an error before the pasted content was moved successfully, and it is left in a weird state.
For example the site search can find the content in the new pasted location, and the bread-crumbs show that those content pages are beneath the folder which is otherwise invisible to Plone.
Is it possible - maybe through the ZMI - to get this folder to be visible in the Plone world?
That is a weird bug. The quick solution to get the folder to display in Plone is to go to the ZMI, then visit portal_catalog, then locate (in one of the tabs) the button to rebuild the catalog. This ought to regenerate the catalog indexes (which may have failed to be updated when you did the cut/paste, through no fault of your own) and thus all the views (folder listings, etc) in Plone will display the new index (the views use the catalog to know what to display).
The same problem as I copied a folder from one language folder to an other the pasted object was only visible in ZMI
As fRiSi said the problem was the language category in Categorization tab > Language
Because I had many subobjects inside a folder I run the script below to change the language categorization recursively
Based on Convert LinguaPlone sub-language back to language for all content?
path = '/'.join(context.getPhysicalPath())
for brain in context.portal_catalog(path={'query': path, 'depth': 1000}, Language="it"):
obj = brain.getObject()
obj.setLanguage('en')
obj.reindexObject(idxs=['Language'])
print brain.getURL()
return printed