WillBontrager
Forum Replies Created
-
WaquireXMII, the character “<” is on the first line of your PHP code.
Verify you’ve removed the <?php from the PHP code you’re using below the [insert_php] tag. If removed and you still get the error, there will be another way the “<” character is unexpectedly presented in that first line of PHP code.
Will
Forum: Plugins
In reply to: [Woody code snippets - Insert Header Footer Code, AdSense Ads] ConflictHello apollositiweb,
For the record, Insert PHP hasn’t been updated because it doesn’t need updating. It’s checked with each new version and works as it should. There is noting to update.
I find it interesting that Insert PHP works for at least one of your products but spawns errors when the product is duplicated. According to the error message, there is a get_attribute()-related error at line 3 of the code being processed by Insert PHP. But that may be related to something else that happens because of the duplication – perhaps a code conflict (if you have both the original product and the duplicated product on the same page) – but just guessing on that.
From other help requests and responses, I’ve come to the conclusion that Yoast SEO causes an extra parsing of the post or page, perhaps for it’s internal use. It is something to consider that when debugging in case that extra parsing introduces something unexpected.
If the conflict continues, then one of the plugins needs to be deactivated. Here may be other solutions you can use to replace Insert PHP.
Will
OK.
If you’ll put your code into a stand-alone PHP page and type its URL into your browser, you’ll find the errors.
<?php echo "<form>"; echo "<select name="Department">"; echo "<option value="First Name">First Name</option>"; echo "<option value=’Last Name’>Last Name</option>"; echo "</select>"; echo "<input type=’submit’ value=’Submit’>"; echo "</form>"; ?>
When it runs OK in the stand-alone page, it should run OK with Insert PHP. It’s a great debugging technique.
Will
- This reply was modified 7 years, 4 months ago by WillBontrager.
- This reply was modified 7 years, 4 months ago by WillBontrager.
I’m sorry, Pam, but “does not work” is no help to me at all.
What does it do that you think it should not?
What does it not do that you think it should?
What are the error messages, if any?
Thanks!
Will
You are wonderfully persistent. An inspiration.
A reply to your private email is on the way with several things that can be tried for resolving the conflict or determining what is causing it.
In essence, if there is a conflict and the conflict can’t be resolved, only one of the two plugins can be used.
If your PHP code can run as an independent file, it may be uploaded to your server and its output inserted into the WordPress post or page with Insert Here found at https://www.willmaster.com/software/WPplugins/insert-here-wordpress-plugin.php
Will
I’m uncertain what you mean by manual. But updating Insert PHP to work in widgets is unlikely to happen.
Will
Sorry, Insert PHP doesn’t use shortcodes. The [insert_php] tag looks like a shortcode, but is not. It’s merely a placeholder so Insert PHP knows what part of the page to scan and replace.
Will
If the only change is whether or not Insert PHP is activated, then it would appear to indeed be Insert PHP that’s causing it.
Unfortunately, I’m uncertain what you mean by saving pages. If you mean saving from the post-update page of the dashboard, try creating a temporary post with the minimum of Insert PHP code.
[insert_php] echo(date("r")); [/insert_php]
If this works but the page you’re currently testing does not, then there is likely to be some other error somehow related to Insert PHP. Perhap an error in the PHP code between the insert_php tags.
Yes, the last update was a couple years ago. I test it with each new WP version. It continues to work and doesn’t need an update. It’s a simple little plugin, actually.
Will
- This reply was modified 7 years, 6 months ago by WillBontrager.
- This reply was modified 7 years, 6 months ago by WillBontrager.
Sorry, I don’t know how to do that within the constraints of Insert PHP.
Will
Information about the inability to use variables that exist outside the tags of the Insert PHP code is at
https://www.willmaster.com/software/WPplugins/insert-php-wordpress-plugin-instructions.php#inandofitselfThe page also has other information that may be of interest.
Because I’m not familiar with the project, I’m unprepared to recommend what to do instead. Sorry.
Will
- This reply was modified 7 years, 7 months ago by WillBontrager. Reason: clarification
If an Insert PHP tag appears as plain text in Safari on iPhone, it will appear as plain text on any good browser. (Insert PHP tags look like shortcodes, but they aren’t.)
There are a number of reasons that might happen, including using the Visual tab instead of Text, unbalanced Insert PHP tags, and giving it buggy PHP code. Lots of possible reasons.
Suggest reading the instructions page, as it contains some things related to Insert PHP that you might not be aware of.
https://www.willmaster.com/software/WPplugins/insert-php-wordpress-plugin-instructions.php
And also check your server error logs. They might provide a clue.
Will
Esaba, this page talks about that, with work-around, and a few other code elements that don’t work as expected.
Will
Error 500 means Internal Server Error. There’s something wrong in your code, somehow.
Make a stand-alone PHP page with the connection code. When you get that working, it should work with Insert PHP.
Insert PHP is not and won’t be modified to work with specific themes. It would be a never-ending race to keep up and I’m unwilling to enter that race for a free download.
It’s not a theme issue, actually, unless the theme or interface changes the PHP code you paste between the insert_php codes.
Make a stand-alone page and get the code working in it.
Will
- This reply was modified 7 years, 8 months ago by WillBontrager.
- This reply was modified 7 years, 8 months ago by WillBontrager.
It appears that a block of code hasn’t been closed. It might be a missing quotation mark or missing curly brace. Try putting your PHP code into a separate page altogether and test it that way. When it works, then it should also work within the Insert PHP tags on your post or page.
Will
Unfortunately, “cannot get the plugin to work” tells me no more than someone taking a car to a mechanic and saying “it doesn’t work”. The mechanic isn’t going to check the car bumper to bumper, wheelbase through engine, gas cap through windshield, tires, and everything else, trying to find out what it is that’s not working — not when the person could have just told him.
Therefore, let’s do this one step at a time.
First, tell me what your error logs say.
Will