Hi, I noticed a weird behaviour in the way DIVI settings are being applied. Long story short is that I have two content templates and every time I save one, the other seems to be losing all CSS settings.
Steps to reproduce:
1. Create a content template to view a CPT and use DIVI (changing the CSS quite drastically through the module options).
2. Save and observe that the post is displayed the way you wanted.
3. Now create another content template to edit the same CPT (and change the CSS as well).
4. Save and observe that the first template is now ignoring all CSS settings defined earlier.
5. Edit the post and observe that the edit page is styled as expected.
6. Now go to the first content template and simply save it again.
7. Observe that the post view is now displayed with the correct style.
8. Edit the post and observe that the edit page is not applying the CSS anymore.
You just need to save the "edit" template to have the CSS working again, but it would break again the CSS of the "view" page.
UPDATE: I think that the problem is that DIVI creates CSS stylesheets based on the name of the page. However, when viewing or editing a CPT, the slug is the same, just with some options passed after the "?". Therefore the CSS is being overwritten by DIVI itself. Any idea how to get past this? Otherwise, it won't be possible to use the DIVI builder for both viewing and editing the same post.
Dear Mirko,
Thanks for the details, in the steps you mentioned above:
1) and 3) you are using two content templates to the same CPT, how do you setup them? can you take a screenshot for them?
Is there any special setting needed to setup in DIVI?
I need to duplicate same problem and debug it in my localhost, thanks
Hi Luo,
thanks for your answer. I attached a picture.
1) is a standard content template associated to the CPT I am using ("Single Plan Template"). I followed this tutorial to create it: https://toolset.com/documentation/recommended-themes/toolset-divi-integration/front-end-forms-for-submitting-content-and-registering-users/
In regards to 3), I first created an "edit" form with CRED (Type: Edit existing content, associated to my CPT). I then created a "content template" with DIVI, including the Edit Form ("Single Plan Edit Template"), not associated to any CPT. Ultimately, I went back to the first template and included the edit link and in the shortcode parameters, I linked the second template. The syntax I used is highlighted in the second image (sorry the code tag returns an empty line).
Thanks
Since it is a compatibility problem between Divi an Views plugin, please check these:
1) Deactivate other plugins and switch to original Divi theme, an test again,
2) If the problem persists, please provide a Duplicator package of your website in below private detail box, also point out the problem content template URLs and post URL, I need to duplicate same problem and debug it in my localhost, thanks
Thanks for the details, I am downloading the files, will feedback if there is anything found
In the duplicator package you provided, there is only a database dump file, in order to duplicate same problem, I need the original DIVI theme, please follow our document to setup the duplicator package
https://toolset.com/faq/provide-supporters-copy-site/
then update your hidden post with new duplicator package:
https://toolset.com/forums/topic/divi-css-settings-being-overridden/#post-585428
and point out problem URL, describe detail steps for where and how can I see the problem:
Edit the post and observe that the edit page is not applying the CSS anymore
Thanks
Thanks for the details, but I can download the zip file "duplicator.zip" + installer.php, when I run the installer.php, I get this error:
Archive File Not Found!
Name: 20171102_projecttoolshq_618e41f7427bd9ce7492171103152227_archive.zip
Seams you have provided a wrong duplicate package file, it should be with file name:
20171102_projecttoolshq_618e41f7427bd9ce7492171103152227_archive.zip
Please check it, and update your hidden post
https://toolset.com/forums/topic/divi-css-settings-being-overridden/#post-585428
thanks