WordPress.org

Ready to get started?Download WordPress

Forums

WP Photo Album Plus
[resolved] Another Newbie Question (25 posts)

  1. HowardParsons
    Member
    Posted 1 year ago #

    I'm just getting started w/ WP Photo Album Plus and I'm probably doing something wrong but I decided to post here with the hope that some one will show me the error of my ways.

    I presently have 2 Albums, one of which I want to use with a Post. I'm using the following short code:
    [wppa type=”slideonly" album=”2" size="450"][/wppa]

    Nothing terribly complicated there but when I use it in my post, I get Album 1 displayed and Album 2 displayed just below it. Obviously, I only want to show Album 2 but why do I get Albums 1 and 2.

    So what am I doing wrong? What setting have I overlooked? I've tried this with scripting but still get the same result.

    Howard Parsons

    http://wordpress.org/extend/plugins/wp-photo-album-plus/

  2. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 1 year ago #

    This should work as you expect.

    A link please, then i can see more...

  3. HowardParsons
    Member
    Posted 1 year ago #

    Here is the link:
    http://howardparsons.info/photo-album-test-post/

    and the short link as well:
    http://wp.me/p2mqnJ-1zr

    I have a few notes for you in the post.

  4. HowardParsons
    Member
    Posted 1 year ago #

    I may have figured this out. In Album Admin, I changed the value of Parent Album from -- none -- to -- separate --. Now it shows only the album I want.

  5. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 1 year ago #

    What is your theme? I can not find Rant2

  6. HowardParsons
    Member
    Posted 1 year ago #

    Rant2 is an Artisteer theme I cobbled together. I can send you a copy if you like.

  7. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 1 year ago #

    I just want to see your initial problem: having an album with parent set to ---none--- and a shortcode like [wppa type=”slideonly" album=”2" size="450"][/wppa] and displaying 2 albums. Can you verify that this also happens in any 'official' theme?

  8. HowardParsons
    Member
    Posted 1 year ago #

    I tried this with the three themes included in WordPress:

    1. Twenty Ten
    2. Twenty Eleven
    3. Twenty Twelve

    Here are the results.

  9. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 1 year ago #

    I have seen that. Now i want to know the exact shortcode in Photo Album Test Post, and the parents and id numbers of Burns night 2013 and Test album.

    You can set the album sequencing method in Table IV-D1,2

  10. HowardParsons
    Member
    Posted 1 year ago #

    I have taken screen-shots of both the post itself showing the short code and the Album Management page showing the ID's & parents of the two albums.

    I am using the same page as I did for the screen-shots of three themes.

    Here are the Screen-Shots.

  11. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 1 year ago #

    The display you get is like the shorcode is:

    [wppa][/wppa]

    or

    [wppa size="450"][/wppa]

    i.e. a so-called generic album display.

    The only thing i can imagine is that there is another plugin that has changed the way of processing shortcodes.

    You can try this:

    in stead of:

    [wppa type=”slideonly" album=”2" size="450"][/wppa]
    ( the new shortcode method )

    write:

    %%wppa%% %%slideonly=2%% %%size=450%%
    ( the classic scripting method )

    An other thing you can try is temporary de-activate all other plugins.
    If this works, i would like to know what plugin spoils it.

  12. HowardParsons
    Member
    Posted 1 year ago #

    Well, the scripting method seems to work. I replaced the short code with %%wppa%% %%cover=2%% %%size=450%% and was rewarded with only one album. I went though all the album options & everything worked correctly. "cover" was the last one I tried.

    As for the short code problem, I think that testing the plugins that I know process short codes may be a good place to start. I'll let you know what I find.

    (BTW, the test page is still active so you can use the link in the posts above to see for yourself.)

  13. HowardParsons
    Member
    Posted 1 year ago #

    Would you believe that I turned off every single plug-in except yours and still saw the same problem!?!?

  14. jay1318
    Member
    Posted 1 year ago #

    I just cannot find where to disable comments all together. I do NOT want anyone being able to comment on photos or albums. Please, where is this setting?

  15. HowardParsons
    Member
    Posted 1 year ago #

    Table II, Section B, # 10

    Comments System ----------- Enable the comments system

  16. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 1 year ago #

    Would you believe that I turned off every single plug-in except yours and still saw the same problem!?!?

    Unbelievable, but strange things happen.

    Maybe a corrupt installation... update wppa+ to 4.9.7... I would really like to know how it comes, and if it is in my scope of control, fix it, or at least be able to document it.

    Also, i can imagine you do not want to spend more time to this; you have a working workaround. So, i won't blame you if you let this as it is.

    Thanx for your patience anyway.

  17. HowardParsons
    Member
    Posted 1 year ago #

    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.

  18. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 1 year ago #

    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;
  19. HowardParsons
    Member
    Posted 1 year ago #

    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 =

  20. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 1 year ago #

    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(); ??? ).

  21. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 1 year ago #

    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:

    • put in wp-config.php:
      define('WP_DEBUG', true);

      This might produce usefull errormessages.

    • Re-install WP
  22. HowardParsons
    Member
    Posted 1 year ago #

    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

  23. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  24. HowardParsons
    Member
    Posted 1 year ago #

    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

  25. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic