soflyy / oxygen-bugs-and-features

Bug Reports & Feature Requests for Oxygen
https://oxygenbuilder.com/
315 stars 30 forks source link

Duplicate JSON IDs - v4alpha #2657

Open QTRichieRich opened 2 years ago

QTRichieRich commented 2 years ago

I am getting an issue when working on a template where JSON IDs end up being duplicated and it's causing issues in the builder.

It's hard to replicate, but occurs consistently in this template.

Screen Shot 2022-01-07 at 15 12 54

This site is a clean v4alpha install, but was migrated from a local machine to remote server. There were some other issues in the template due to migration that I will create a new ticket for if I can replicate. Since migrating at random times I will hit a duplicate issue when adding elements to the template. The new element can't be deleted the original element of the same id is duplicated otherwise both elements are deleted.

Going into to the database and modifying the json fixes the problem...

In my screenshot, changing the code from

{ "id":253, "name":"ct_link_text", "options":{ "ct_id":253, "ct_parent":253, "selector":"link_text-253-57", "original":[

    ],
    "nicename":"Text Link (#253)"
 },
 "depth":4

}

to

{ "id":254, "name":"ct_link_text", "options":{ "ct_id":254, "ct_parent":253, "selector":"link_text-254-57", "original":[

    ],
    "nicename":"Text Link (#254)"
 },
 "depth":4

}

fixes the problem.

Spellhammer commented 2 years ago

Does the problem occur when no Oxygen add-ons are active?

QTRichieRich commented 2 years ago

This site is a pure Oxygen install, no other Oxygen add ons installed and/or active…

KittenCodes commented 2 years ago

@QTRichieRich

This site is a clean v4alpha install, but was migrated from a local machine to remote server

Please could you let me know how you migrated the site and what steps you took after you'd migrated it?

QTRichieRich commented 2 years ago

Hi @KittenCodes

I used All In One Migration to migrate the site, then once migrated flushed permalinks, re-signed all shortcodes and then regenerated CSS...

From there, the two templates were all over the place, so I went into template and saved and came back out.

The biggest issue at this point was where ever I had used a code block, they had moved out of their original containers into their grandparent element.

I have the original local site and the All In Migration Export if you would like the file to test your end?

KittenCodes commented 2 years ago

@QTRichieRich

I apologise for the late reply.

I have the original local site and the All In Migration Export if you would like the file to test your end?

Would you mind checking if you can reproduce this in Alpha 2? If you can, then please could you open a support ticket so that we can try your migration file?

QTRichieRich commented 2 years ago

@KittenCodes

No need to apologise...

I created a new instance, migrated the site over using AIO, upgraded Oxygen to Alpha 2 and the template won't actually load in the builder... If the template inherits from Main, it will open the main template, if not, it will open nothing... No browser or server errors...

Where would you like the migration file?

QTRichieRich commented 2 years ago

I tell a lie, here's some of the error log...

2022/01/19 14:57:43 [error] 17#17: *704 FastCGI sent in stderr: "arning: DOMDocument::loadHTML(): Tag path invalid in Entity, line: 13 in /../wp-content/plugins/oxygen/component-framework/components/classes/dynamic-list.class.php on line 889PHP message: PHP Warning: DOMDocument::loadHTML(): ID div_block-815-57 already defined in Entity, line: 17 in /../wp-content/plugins/oxygen/component-framework/components/classes/dynamic-list.class.php on line 889PHP message: PHP Warning: DOMDocument::loadHTML(): ID div_block-790-57 already defined in Entity, line: 17 in /../wp-content/plugins/oxygen/component-framework/components/classes/dynamic-list.class.php on line 889PHP message: PHP Warning: DOMDocument::loadHTML(): ID text_block-738-57 already defined in Entity, line: 17 in /../wp-content/plugins/oxygen/component-framework/components/classes/dynamic-list.class.php on line 889PHP message: PHP Warning: DOMDocument::loadHTML(): ID span-819-57 already defined in Entity, line: 17 in /../wp-content/plugins/oxygen/component-framework/components/classes/dynamic-list.class.php on line 889PHP message: PHP Warning: DOMDocument::loadHTML(): ID code_block-792-57 already defined in Entity, line: 17 in /../wp-content/plugins/oxygen/component-framework/components/classes/dynamic-list.class.php on line 889PHP message: PHP Warning: DOMDocument::loadHTML(): Tag svg invalid in Entity, line: 17 in /../wp-content/plugins/oxygen/component-framework/components/classes/dynamic-list.class.php on line 889PHP message: PHP Warning: DOMDocument::loadHTML(): ID Home already defined in Entity, line: 18 in /../wp-content/plugins/oxygen/component-framework/components/classes/dynamic-list.class.php on line 889PHP message: PHP Warning: DOMDocument::loadHTML(): Tag g invalid in Entity, line: 18 in /../wp-content/plug

QTRichieRich commented 2 years ago

It looks like it could be to do with inline svg in Code Blocks?

2022/01/19 14:57:43 [error] 17#17: *704 FastCGI sent in stderr: "ins/oxygen/component-framework/components/classes/dynamic-list.class.php on line 889PHP message: PHP Warning: DOMDocument::loadHTML(): Tag g invalid in Entity, line: 44 in /../wp-content/plugins/oxygen/component-framework/components/classes/dynamic-list.class.php on line 889PHP message: PHP Warning: DOMDocument::loadHTML(): ID Line already defined in Entity, line: 45 in /../wp-content/plugins/oxygen/component-framework/components/classes/dynamic-list.class.php on line 889PHP message: PHP Warning: DOMDocument::loadHTML(): Tag path invalid in Entity, line: 45 in /../wp-content/plugins/oxygen/component-framework/components/classes/dynamic-list.class.php on line 889PHP message: PHP Warning: DOMDocument::loadHTML(): ID div_block-101-57 already defined in Entity, line: 1 in /../wp-content/plugins/oxygen/component-framework/components/classes/dynamic-list.class.php on line 889PHP message: PHP Warning: DOMDocument::loadHTML(): ID link-640-57 already defined in Entity, line: 1 in /../wp-content/plugins/oxygen/component-framework/components/classes/dynamic-list.class.php on line 889PHP message: PHP Warning: DOMDocument::loadHTML(): ID div_block-642-57 already defined in Entity, line: 1 in /../wp-content/plugins/oxygen/component-framework/components/classes/dynamic-list.class.php on line 889PHP message: PHP Warning: DOMDocument::loadHTML(): ID image-199-57 already defined in Entity, line: 1 in /../wp-content/plugins/oxygen/component-framework/components/classes/dynamic-list.class.php on line 889PHP message: PHP Warning: DOMDocument::loadHTML(): ID div_block-152-57 already defined in Entity, line: 1 in /../wp-content/plugins/oxygen/component-framework/components/classes/dynamic-list.class.php on line 889PHP message: PHP Warning: DOMDocument::loadH

QTRichieRich commented 2 years ago

Also, i have just taken my v4alpha1 site, migrated to a new site, then upgraded to v4alpha2. I did the usual Permalinks/Sign Shortcodes/Regenerate CSS... You can see he structure difference between the two sites post migration.

You can see elements have been popped out of their respective containers...

What is should be like Screen Shot 2022-01-19 at 15 18 09

Post Migration Screen Shot 2022-01-19 at 15 12 48

KittenCodes commented 2 years ago

@QTRichieRich Yes please, an AIO file and admin-level credentials would be really helpful.

We wouldn't troubleshoot issues between upgrading from Alpha 1 to Alpha 2 (as we make a number of changes between Alpha releases), but I'd like to take a look at issues from v3.9 to Alpha 2.

QTRichieRich commented 2 years ago

I figured that would be the case - I created a ticket this morning linking to this thread - credentials included.

portseif commented 2 years ago

I am also having this issue and cannot come up with a fix. Has anyone come up with a fix? The only workaround that I've come up with is to create an element, make sure that the element ID correlates with the element (e.g., a button returns link_button and not section).