Concrete5 - Sitemap Search Selector does not properly paginate - concrete5

The sitemap search selector overlay (e.g. "Select Page") does not properly paginate when over 100 children pages are present.
The pagination appears, but click "Next >" or a number does not change the sitemap in anyway. The issue appears in both Chrome and Firefox (haven't tested others).
The issue is present in both "Full sitemap" and "Flat view".
Some solution state to add define('SITEMAP_PAGES_LIMIT',200); to the config/site.php. Those answers however date from 2012 and since the site.php has been removed.
Currently using Concrete5 version 8.3.1.
How can I increase the number of paginated pages shown in the page selector?

You can try the config key concrete.limits.sitemap_pages.
The default value is 100 and is located in concrete/config/concrete.php:1078.
You can override it simple by adding a similar php array in your application/config/concrete.php file.

Related

Why would WooCommerce Product Attributes disappear on save

I have a WooCommerce store that has products with attributes that are associated with variations. When I save products, the attributes disappear (and therefore the associated variations do, too). When I re-add the attributes and save the product again, the variations come back as they were. (Note that this means attributes don’t always disappear - only when they’re not manually added before saving. )
No errors are logged.
I'm looking for some insight as to why this would happen.
I had the same issue since I use Ozisti theme for my site, too.
The workaround was to do NOT USE "Save attributes" button on product page. To save attributes changes USE "Update" (product page - on the top/right of the page).
The problem has been solved with Ozisti ThemeREX support team. They sent me new files:
wp-content/plugins/trx_addons/components/api/woocommerce/woocommerce-extended-attributes.php
wp-content/plugins/trx_addons/includes/plugin.wp.php
and now it works fine.
Regards, Jacek
I think I had a similar problem.
WordPress 5.1.1
WooCommerce 3.5.7
Ozitsi 1.0.2 Theme by ThemeRex (here was the problem)
Solution summary: Add attribute, add options, press SAVE ATTRIBUTES (attribute row folds) -> UNFOLD IT immediately - if you don't see options inserted a second ago into the Comboselect field read on.
In my case plugin ThemeREX Add-ons (shipped with Ozisti theme) was the issue. It added extra attribute types, so I could turn variations between dropdown select, image, color and button types.
After few hours of debugging I noticed that when attribute was set to one of the new types, UPDATING PRODUCT did erase all added attributes -> and by extension variations.
After ADDING ATTRIBUTES again (without SAVE ATTRIBUTES button - just adding attributes and UPDATING product) all was back in place.
Notice: when you SAVE ATTRIBUTES the row with options closes, the variations become available. But when I opened the attribute row after all AJAX saving was done it turned out that there were no OPTIONS placed in this Wordpress combo select of attribute I just edited.
So on UPDATING PRODUCT WooCommerce saved empty attribute options into DB.
This might not be perfect solution but I solved this by modifying WooCommerce's meta-boxes-product.js
I commented out line 465 and added another line to close the row:
$( '.product_attributes' ).html( response.data.html );
$( '.product_attributes .woocommerce_attribute.open .handlediv' ).trigger('click');
I didn't trace everything to the roots but makinkg it work for this single project is good enough for me at this point.
You probably use other plugins then me, but maybe they do something similar to my case.
So try to SAVE ATTRIBUTES and then immediately open attribute row again and check if selected options are inserted.. if not.. try my solution.
This Happen to me This Year. I was debugging my store for 3 days.
Solution:
I load a css file on Wordpress back office with these lines:
.save_attributes, .save-variation-changes {
display:none !important;
}
This makes WooCommerce Hide 2 buttons.
Save Attribute and Save Variation. So clients will be forced to use the update button in the product page. I'm still not sure if this is a Woocommerce bug or other plugin but for some reason, if I pressed one of these 2 buttons I would lose all my variations.
I have similiar solution with #Maciej Dejewski using Woocommerce v3.6.5.
On file /plugins/woocommerce/assets/js/admin/meta-boxes-product.js or /plugins/woocommerce/assets/js/admin/meta-boxes-product.min.js (depends on your admin page calling the javascript - you can check it via inspect element)
But instead adding line
$( '.product_attributes .woocommerce_attribute.open .handlediv' ).trigger('click');
Just commented out this
$( '.product_attributes' ).html( response.data.html );
Working fine for me
Here's the screenshot
Hope this would help!
After debugging for a hour, it turns out that my variations only disappear when not each attribute is selected. However, some of my product's attributes have between 10 and 150 entries..so that is the downside when using this method.

Ensure a Rules Link only shows in a set type within a Panel Page (Drupal)

I've created a Rules Link (in a View) which shows in a users dashboard using Drupal v.7.27 as CMS for a number of (similar) projects using the same functionality. The Rules Link is set to 'trigger' a rule when the user clicks "Post Content" (the Rules Link). The Rules link works fine and fires the trigger which then follows the simple conditions I've set and only because I've created Variant Panel pages for each User Type, the Rules Link only shows on the ones I've set the Panels Page Access conditions (ie Role: Content Manager).
However, I've noticed that as I'm also using the Support Ticket Module, then "Post Content" Rules Link is also showing on the top of the list of a users Support Tickets list (only for testing here, but it's shows my test comments from both user and Admin user) AND* it also shows on a link on all other Node types.
Clearly I don't want the Rules Link to show at the top or bottom of any other content type other than a Node (ie on the Post New Content Panel Page). At the moment is set within the Rules "Edit Bundle" section to show across 'none' as there is no option to force it to show ONLY on my Dashboard Panel. I'm also using the 'Render' Rules option and tried every option but to no avail after a few hours.
I've had to set the option to 'Nodes' in the Entity type which the Rules Link is attached to (because my Article data is a Node within the Panel Page) and it says quote:
'Bundles to which the link should be attached to. If left empty, the link is not restricted for any bundles' under the Bundles section.'
Furthermore, within the Views entity created (used to set the 'Rules Link' into any Node), there is no option that I can find which enforces the Rules Link to only be limited to a particular node, which in my case is a custom Page Panel. Maybe I lack current Drupal knowledge or simply have over looked an issue.
I know I need to learn PHP (yes, currently working through CodeAcademy!) but in order to get the thing working functionally, can anyone advise on what is going wrong and why the Rules Link is showing n other Node types and for a PHP novice like me at this stage, could I simply put some PHP in somewhere that would ensure the Rules Link only shows on a set Content Panel on my custom Panel Page.
I hope I have been clear enough and help at this stage is most gratefully received. Thanks in advance.
EDIT:
Actually the Rules Link is showing on all other Nodes (see above*). I've noticed that Bundles might be the key here? I've todate not used Bundles if that helps anyone?
RESOLVED
I found the source of the problem.
The answer is to ensure that the "Render Entity" is un-ticked in the option box:
"Show link when entity is rendered
If checked,the link is shown when viewing an entity to which the bundle and the visibility conditions apply. Only applies to displayed entity types and if no addition variables were added."
I hope that helps any future readers.

Drupal Views pager not working but results showing

We have a view setup to pickup the author/id
I see results, however, the pager is not working. We have a pager set, but at the bottom, it says "No query was run".
In addition, if I use the contextual filter and type author/110, it shows nothing on the preview, even though the regular page shows results.
How can I filter and get the pager working.
Update: I chose "Full Pager" and I can see it on the preview, but not the regular page after I save. What could the problem be?
Update 2: If I set pager id = 1 or higher, I can see it on the preview AND the regular page. However, it has odd url values with commas, is page 2 really Page 2?
The $pager variable within the templates (in views - theme information regarding active template name) might be missing or check for any views hook (there are min. 8 of them) that is changing the behavior of the views.

(drupal) ckeditor breaks my blockcode tags

I'm using blockcode and geshi module on my blog to highlight syntax in my posts. but everytime i edit a post with blockcode tags i have to disable ckeditor, because otherwise it will break my code, it inserts nbsp and br tags, which are visible in the post, or totally drop newlines. this is really annoying.
does someone know a way how to fix this!?
thanks a lot!
I'm not sure which module you are using to provide the ckeditor (ckeditor or wysiwyg module?), but the only thing I can think of would be to flat out prevent the editor from appearing for the specific field. I wish there was a way to run a snippet and check for a substring, and then display the editor based on that... but that would be fairly complicated to do.
The joy that is Drupal (notice the sarcasm) has a cleverer way to deal with this. I am using the CKEditor module.
Beneath every CKeditor WYSIWYG form field, you see the text:
CKEditor: the ID for excluding or including this element is {theme-name}:{path to field-name}
For one of my particular fields, specifically one that allows me to change the contents of a particular block, this becomes:
CKEditor: the ID for excluding or including this element is garland:admin/build/block/configure/block/10.edit-body
To not have CKEditor show up for this particular field, do this:
Go to your blocks administration page.
Find CKEditor.
Click on 'CKEditor' listed under the CKEditor block heading.
Figure out which is the relevant profile for you as an admin (probably by default this would be 'authenticated user').
Edit the relevant profile.
Click 'Visibility settings'.
"Use inclusion or exclusion mode:" is most probably set to "Exclusion". In the box labelled "Fields to exclude/include:" enter the line below the CKEditor box you want to get rid of. In my case "CKEditor: the ID for excluding or including this element is garland:admin/build/block/configure/block/10.edit-body"
Save
As the French say, "c'est tout".

DRUPAL: Views, exposed filter: how to unselect all items as default

I'm using Views with an exposed filter with tags. (integrated with Better exposed filter).
In the settings I can select one or more tags as starting selected tags when I visit the page for the first time.
However I cannot unselect all of them. I would like to not have selected tags at the beginning and at the same to see all articles. (N.B. I'm using "Is one of" operator, and it works perfectly for my website).
So the question is, can I have none tags unselect as default and see all my nodes ?
thanks
You must mark the filter as optional.

Resources