Skip to content

Can get a 'hidden' validation warning trying to clone if exp_channel_titles missing ip #3998

Description

@robinsowell

User was getting a weird issue trying to clone some entries- it would do a validation error message, but nothing was highlighted as invalid. After digging, it was objecting to a missing ip_address field- but there was no ip_address form field.

Digging into it, it validates the ip_address from/for the ip_address in exp_channel_titles.

Locally, I tried cloning an entry with a blank ip_address in that field- but that work. Then I stuck a 0 in the field, and boom- replicate.

Not sure why, but user had 0 in the ip_address db column for some of those entries, and if you try to clone those, it acts like there's a validation error. Though you can't see what's causing the error, because ip_address isn't a form field.

Note- tested with ip_address required to post in the settings. But no idea if that's in play- I suspect it is moot.

Activity

  1. robinsowell commented on Jan 12, 2024

    @robinsowell
    ContributorAuthor

    And in case it ever comes up- you. can see the validation errors for a form submit hacking ExpressionEngine/Model/Channel/ChannelEntry.php:

    
                // restore our package and view paths
                ee()->load->remove_package_path($info->getPath());
            }
    		
    		var_dump($result->getAllErrors()); die;
    
            return $result;
        }
    
        /**
         * Validate entry count for this channel against channel's
         * max_entries setting
         */
        public function validateMaxEntries($key, $value, $params, $rule)
    
  2. added a commit that references this issue on Jan 15, 2024
    8b17784
  3. intoeetive commented on Jan 15, 2024

    @intoeetive
    Contributor

    The IP address is kinda special because it is the property on the ChannelEntry model, it has validation, but it's not on the page - so there is no place where the error could be shown.

    Since this seems to currently be only one of this kind, I've added a "special case" to treat it.

    The error message could have been better, but that's what comes from validation service (and I think it's generic on purpose)

    image

  4. added a commit that references this issue on Feb 22, 2024
    2ad34e4
  5. added a commit that references this issue on Oct 19, 2026
    17dac2a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      Sponsor
      SponsoredKunjungi sekarang
      Promo