auto generate title of custom post type which concludes id not working

The filter “wp_insert_post_data” runs before the data is inserted into the database. When you create a new post, the ID is not set yet, it is set by the auto_increment field in the database.

You can use a filter or action later in the process like save_post.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)