Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
I recently upgraded my Optimizely module from version 12.0.2 to 12.20.0, which is responsible for image uploads via a third-party API. While it was working fine with Optimizely 12.0.2, I encountered a few issues with the publish event handler code after the upgrade.
This event handler fires not only during the publishing event but also during the creation of a new page. Is there a way to ensure that this event is triggered only when the publishing process is completed? It's worth mentioning that this issue was present in the previous version as well.
The purpose of the method called by the published event is to collect data within the page, added by our module, and post this collected data to another API endpoint. To achieve this, the data collection function utilizes the HTML Agility Pack to read the nodes in the page and filter them based on CSS classes and other attributes. Here's the code for the method in
Now, when I call the above method with an externally hosted image URL (an image downloaded from a CDN), the following line of code returns null:
However, if the
src
attribute contains an internal URL (within the image folder on the website), it returns the correct media file. Do you have any idea why this might be happening?