Repository navigation
Resolved #3998 where cloning an entry with an invalid IP address failed validation - #5362
Merged
bryannielsen merged 1 commit intoOct 19, 2026
Conversation
Clone creates a new entry but inherited invalid source IPs (e.g. MySQL default 0 from programmatic creates) fail full validation. Match Publish::create() and set the cloner IP during CLONING_MODE. Co-authored-by: Cursor <cursoragent@cursor.com>
TomJaeger
approved these changes
Sep 30, 2026
bryannielsen
approved these changes
Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #3998 / #4001. Programmatic entry creation (migrations, Model
make()without settingip_address, some add-ons) can persist MySQL’s default0, which is not a valid IP. Normal Edit/Save still works because partial validation skips an unchanged IP field. Clone is the known CP friction point: itsetId(null)s and full-validates as a new entry while inheriting the source IP, so an invalid source IP blocks clone even though IP is not a form field.This change stamps the cloner’s session IP during
CLONING_MODE(same asPublish::create()), with a fallback toee()->input->ip_address()if session IP is empty. The new cloned row gets a valid IP. The original entry’sip_addressis not modified.How to reproduce
exp_channel_titles.ip_addressto'0'(simulates programmatic/legacy creates).ip_address: This field must contain a valid IP.'0'; new entry IP is the current CP session IP.Test plan
ip_address = '0'succeeds after fix (verified on Exida local)ip_address = '0'does not rewrite IPResolves #3998
Made with Cursor