I’ve been in IT for 39 years so I don’t mind beating on this until we find the problem. I’ve been using 4.9.7 since you released it.
That is great. I started with ALGOL60, remember? FORTRAN was rocket science…
in wppa-filter.php on line 300 it reads:
// Count (internally to wppa_albums)
You might putting a diagnostic there:
echo 'Album='.$wppa['start_album'];
I wonder if it says 2 or nothing ( with the [wppa ] shortcode of course )
At line 276 it should happen…
case 'slideonly':
$wppa['start_album'] = $album;
Hi!
I put in the debug statement & got “Album = “
I then put a debug statement at line 267 & got nothing.
Finally, I put 3 statements before the “switch” statement & got the following:
Start of switch
type = generic
album =
So the problem is here:
Line 226:
extract( shortcode_atts( array(
'type' => 'generic',
'album' => '',
'photo' => '',
'size' => '',
'align' => ''
), $atts ) );
either extract() or shortcode_atts() doesn’t do its job on your system.
Add this on line 225: print_r($atts);
as diagnostic to see if wppa_shortcodes()
gets his args.
It looks we have found a wp bug ( in do_shortcode();
??? ).
I discovered that forgetting a space between the “value” and the next keyword is lethal:
Right:
[wppa keyword="value" keyword="value" keyword="value"][/wppa]
Wrong:
[wppa keyword="value"keyword="value"keyword="value"][/wppa]
Two more debugging suggestions:
Here are the results of the debug statement on line 225:
Array ( [0] => type=”slideonly” [1] => album=”2″ [size] => 450 )
I put in some echo statements following the extract just to confirm:
$type = generic
$album =
$size = 450
WP_Debug produced errors in 2 other plug-ins:
Notice: Undefined variable: iwp_action in /home/content/t/h/e/theparsonage/html/HTP/wp-content/plugins/better-wp-security/inc/secure.php on line 22
Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at /home/content/t/h/e/theparsonage/html/HTP/wp-content/plugins/better-wp-security/inc/secure.php:22) in /home/content/t/h/e/theparsonage/html/HTP/wp-content/plugins/merlic-user-registration/merlic-user-registration.php on line 24
Finally, I put so,e debug statements in shortcodes_php & here is what I got:
Array ( [0] => type=”slideonly” [1] => album=”2″ [size] => 450 ) Entering shortcode_atts
$name = type
Default \\ No value found for $name
$name = album
Default
$name = photo
Default
$name = size
$atts[$name] = 450
$name = align
Default
Leaving shortcode_atts
$type = generic
$album =
$size = 450
It looks like the size is the only thing making it through.
Howard
I found it …..!
The slideonly and 2 are surrounded by texturized quotes. Look carefully:
Here are the results of the debug statement on line 225:
Array ( [0] => type=”slideonly” [1] => album=”2″ [size] => 450 )
You typed the shortcode in the visual editor. You better use the shortcode generator, or type it in the html (text) editor.
Pls read this doc page. If you get a blank dialogbox, re-install wppa+ i patched a spurious error. ( You will not loose any photo or album data or setting when you de-activate and delete the plugin, do so and re-install from the plugins page. )
Remove the WP_DEBUG define ( put // in font, for the next time you need it ) Don’t worry about the 2 warnings.
Well, Well! The answer was in front of us all along. I apologise for taking up your valuable time for a problem with such a simple answer.
In the first post, I said
I’m probably doing something wrong . . .
and it appears that I was right about that bit. I need to send you a few Euros within the next couple of days.
Howard
Thank you for your donation.
Sometimes things are too close to one to see it right…
I updated the documentation trying to prevent future victims of this pitfall: http://wppa.opajaap.nl/shortcode-reference/
Case closed.