Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with WordPress 6.5 RC1 and 6.4.3 #82

Closed
mbrsolution opened this issue Mar 7, 2024 · 7 comments · Fixed by #85
Closed

Issue with WordPress 6.5 RC1 and 6.4.3 #82

mbrsolution opened this issue Mar 7, 2024 · 7 comments · Fixed by #85

Comments

@mbrsolution
Copy link

mbrsolution commented Mar 7, 2024

Hi Marc, I found a small issue with WordPress version 6.5 RC1 and WordPress 6.4.3. When I try to save any of the settings in Suffusion Options, the screen goes blank. If I refresh the browser the screen appears again with the changes made. I have tested this on a few browsers with the same results.

Other information:
-WordPress version 6.5 RC1 and 6.4.3
-PHP version 8.2.4 and PHP 8.1.27.
-Suffusion version 4.6.3. Note: I also deleted the theme and downloaded a fresh copy from Github.
-No other plugin active during the test.

Let me know if you need more information or more testing.

Kind regards,
Manuel

@mbrsolution mbrsolution changed the title Issue with WordPress 6.5 RC1 Issue with WordPress 6.5 RC1 and 6.4.3 Mar 7, 2024
@mbtools
Copy link
Contributor

mbtools commented Mar 7, 2024

I will have a look once one of my systems is updated

@marcissimus
Copy link
Collaborator

marcissimus commented Mar 12, 2024

The issue also occurs on my site. However, I have not been able to find the root cause yet...

Can you confirm if this worked correctly in 6.4.1 or 6.4.2?

@mbrsolution
Copy link
Author

I am in the process of setting up two sites locally, one with WordPress 6.4.1 and the other with WordPress 6.4.2. I will let you know what happens.

Kind regards,
Manuel

@mbrsolution
Copy link
Author

mbrsolution commented Mar 13, 2024

Hi, while I was carrying out a test with a new WordPress installation, I installed and activated Suffusion. When I went to save the changes in Suffusion Options I got the following warning message.

Warning: unlink(D:\xampp824\htdocs\wordpress641/wp-content/uploads/suffusion/custom-styles.css): No such file or directory in D:\xampp824\htdocs\wordpress641\wp-content\themes\suffusion\admin\suffusion-options-page.php on line 164

The above warning is coming from the following code.

if (is_array($custom_css) && isset($custom_css['css'])) {
		unlink($filename); // pre-empty  <---- This part of the code is line 164 ------
		if (!$wp_filesystem->put_contents($filename, $custom_css['css'], FS_CHMOD_FILE)) {
			echo "<div class='error'><p>Failed to save file $filename. Please check your folder permissions.</p></div>";
		}
	}

I did check the path and the following file custom-styles.css does exist. So I am not sure why the warning message appeared.

I then refreshed the browser and the warning message did not appear anymore but the issue is still there. Unfortunately I was not able to test WordPress 6.4.1 because WordPress automatically updated my site to the latest version the moment I logged in :(

I thought I would share the above warning message to you. Perhaps this gives you a clue.

However I will try to test WordPress 6.4.1 again but first I have to try and force WordPress from updating to the latest version.

Note: I did manage to test WordPress 6.4.2 without updating to WordPress 6.4.3 :) and I received the same warning message as above. The warning message appeared and then vanished after I refreshed the browser. So I suspect the issue might be coming from the PHP code above.

Let me know if you need more help or testing done.

Kind regards,
Manuel

@marcissimus
Copy link
Collaborator

The warning happens only the first time, when the custom-styles.css file does not exist yet. #84 should avoid the warning.

I found the problem. There was a mistake in the PHP 8.3 upport which I fixed with #85

@marcissimus
Copy link
Collaborator

marcissimus commented Mar 13, 2024

I included everything in 4.6.4. Let me know if this works for you

@mbrsolution
Copy link
Author

It is working as expected 👍
Thank you,
Manuel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants