Page not found when saving product attribute in Magento admin - attributes

When trying :
Stores > Attributes > Product > [product_attribute] values the page returns a 404 response.
the requested url turns into
admin/catalog/index/ instead of admin/catalog/product_attribute

Finally after lot of debugging, solved this by increasing max_input_vars in php.ini from 1000 to 2000;

Related

Pagination in Big Commerce - Not Pre-Fixing correctly

I'm using a stencil theme in Big Commerce and am having an issue with the pagination buttons. When I click on the page number or next button, the site prefix is not adding an additional / to the end of the url.
The url should read as follows:
https://example.com/learn-more/?page=2
but clicking the buttons only links back to the main blog page:
https://example.com/learn-more/
I went through the "Store Front > Blog > {...} (settings) > About This Blog" and made sure the blog url was set to the correct format ( i.e.- /blog/ }, but that is not having the correct effect.
I'm gettting familiar with the stencil themes, but I'm lost on how to correct urls in this format, as the normal react fixes are not there...
Please Help
Yeah, same issue here. After playing with the blog settings like you did, I ended up applying a workaround by correcting the URLs via script just to fix it quickly.
const isBlogPostsPage = $('.blogPosts').length > 0;
if (isBlogPostsPage) {
$('.pagination-link').each(function() {
let link = $(this).attr('href');
link = link.replace('/articles?', '/articles/?');
$(this).attr('href', link);
});
}

Can I set default page to last page when paginating in Laravel 4?

In laravel 4, it's really convenient to do pagination. When the page parameter is missing, the default page is the first page. In my project, it's better to be the last page as default value.
Currently I'm using following UGLY way to hack the pagination. Is there any better way to do this?
if(!Input::get('page') && $comments->getLastPage() > 1)
//Redirect with page=lastPage
And the question can be also asked as that can I set the current page of paginate() function manually? If no, what can I do if I don't want the page parameter to be named page.
If you can live with setting the pagination manually:
// check if a page is set
if(!Input::get('page'))
{
// work out the last page
$lastPage = ceil($totalItems/$perPage);
// set the page - maybe merge would be better than replace???
Input::replace(array('page' => $lastPage));
}
// manually create the paginator
$paginator = Paginator::make($items, $totalItems, $perPage);
I don't know what you're displaying, but would reversing the sorting not work?
Paginator docs

Pagination [+next+] not working on MODx CMS template

I'm having difficulty getting the pagination functionality working with [[Ditto? ... ]] in MODx CMS.
I have the documents displaying in the page, limit is set to 5. The output from my other pagination template placeholders seem to be working but the [+next+] link doesn't load the next set of 5 documents (going in descending date order).
Here's my template code:
[[Ditto?
&parents=`13`
&tpl=`ArticleListChunk`
&display=`5`
&&removeChunk=`Comments`
&paginate=`1`
&extenders=`summary,dateFilter`
&paginateAlwaysShowLinks=`0`
&dateFormat=`%F %D %Y`
]]
<p>Showing <strong>[+start+]</strong> - <strong>[+stop+]</strong> of <strong>[+total+]</strong> Articles</p>
<ul class="clearfix">
<li>[+previous+]</li>
<li>Page <strong>[+currentPage+]</strong> of [+totalPages+]</li>
<li>[+next+]</li>
</ul>
The output I get is:
Showing 1 - 5 of 17 Articles
Page 1 of 4
Next >
as you can see the output is correct, however when I click the 'next' link the resulting URL is .../news.html?start=5 but the content of the page stays the same (i.e. the latest 5 documents are shown!).
This is how the template and functionality was when I was inherited this project from a client, and I have never used MODx CMS before -- can anyone help me please?
I there a way to update the SQL offset with a parameter or something? I've been all through the Wiki pages for Ditto / MODx but can't find what I need or what I should be doing that I'm not!
I would think you need to call ditto uncached [[!Ditto? attribs ]]
That's just a guess.
Also it looks like you are using EVO? check the cache syntax, you might need to put an exclamation mark at the end as well. [[!Ditto? attribs !]]
After plenty of searching I found a post on the MODx forum that pointed me in the right direction.
Turns out that caching was enabled in the page/document's settings (doh!). I disabled this and now it works fine!
However I have not set the no-caching token ('!') in Ditto's parameter string which, including the answer from Sean, my research has suggested is advisable and/or required. I've not worked with MODx before so I can't say for certain, but it seems to work without this for me!
Thanks #SeanKimball as your answer set me down the right path.

How does one correctly set the target page of indexed search results in typo3?

I am working with typo3 4.7 and trying to redirect the search results of the indexed search plugin to a page in my site and managed to stumble upon the constants editor where I've managed to use it to guide me in setting up the object. Below is the current typoscript of the object in my root template (mapped into a TV template):
# --- SEARCHBOX OBJECT ----------------------------------
lib.searchbox < plugin.tx_indexedsearch
lib.searchbox{
#Disable the advanced search link
show.advancedSearchLink = 0
show.rules = 0
show.alwaysShowPageLinks = 1
#pid of root page is 1 and pid of the search result page is 9
search.rootPidList = 1
search.targetPid = 1
view.defaultPid = 9
result_link_target = 9
}
Thus far I have been unsuccessful in my attempts and all results are displayed in the page in where the search was performed. I would also like to know if it is possible to modify the displayed search box so that only the search field is displayed.
Thanks for your time.
Edit: I have installed and I'm trying out solr, if anyone has any experience with it pls feel free to help resolve this issue. My two problems with solr so far is that whilst search does re-direct to the right page, (1) the search box is way too big so I need to be able to modify the display of this box (to remove the button and reduce the size) (2) it spouts som e messages about search rules and returns nothing so far.
Edit 2: Seems solr is the way forward. I have managed to get everything I want done except the result output. I lost a few days (5) before realising that the tomcat container was bound to an ipv6 protocol interface. Resolving that (see here for those who may stumble upon the same problem for how to resolve this) has meant I can now remotely admin the solr server for more information. The pages are being indexed (Not regularly as specified in the scheduler) but I still get no results on the result page, and devlog only returns warning about there not being typo3 search markers despite my TV templates being peppered with them. I can only guess that maybe I'm to mark the results page with some type of marker to get the results to show at this point.
plugin.tx_indexedsearch {
search {
targetPid >
targetPid = 123
}
}
Reference: http://lists.typo3.org/pipermail/typo3-team-core/2010-March/036269.html
Experience: works even in TYPO3 version 6.x.
Default setting for plugin.tx_indexedsearch.search.targetPid is:
plugin.tx_indexedsearch {
search {
# TSFE:id is always the current page
targetPid.data = TSFE:id
}
}
I have never used the indexedsearch plugin as the searchbox on all of my pages.
Normally, I do this
Create a page with the indexed_search plugin as its content, this is
where all search requests are answered
Use macina_searchbox to
display a search box as part of the template
To elaborate:
Install macina_searchbox, and use this Typoscript to configure it
plugin.tx_macinasearchbox_pi1 {
pidSearchpage = {PID_OF_SEARCH_RESULT_PAGE}
templateFile = {PATH_TO_TEMPLATE_FILE_FOR_SEARCH_BOX}
}
Then, include macina_searchbox like so
lib.searchbox < plugin.tx_macinasearchbox_pi1
The search result page just needs the indexed_search plugin where you want the results to be displayed.
I would just create a search box, copy the HTML-Code, adjust action-url and HTML-Code and output it. IMHO there is no need, to render it via Plugin, if you just need an search-input field and an button. But do not forget the hidden fields!

Strange pagination 404 issue with custom post type

I have a really strange problem trying to paginate custom posts types in their archives page, I created a custom post type called property and set an archive page called properties to show them all.
So inside my archive-property.php file added a form (GET method) with a dropdown box so users are able to set how many posts they want to display per page, it looks like this:
<select name="prop_number" id="prop_number">
<option value="12">12</option>
<option value="25">25</option>
<option value="50">50</option>
</select>
So before everything I do:
if (isset($_GET)) {
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$query_args = array(
'post_type' => 'property',
'paged' => $paged,
'posts_per_page' => 12 // Default number of properties per page
);
// Custom number properties per page
if (isset($_GET['prop_number']) && !empty($_GET['prop_number'])) {
$query_args['posts_per_page'] = $_GET['prop_number'];
}
}
query_posts($query_args);
// Do loop and other stuff
It works fine but when I use next_posts_link() to get to the second page I get a page not found 404 error, however if I go to my WP admin area and set the "Blog pages show at most" option to the same number I want per page in my select box (for example I manually set 25 on "Blog pages show at most" and select 25 in my prop_number select box) it does work fine.
I even tried using the WP-PageNavi plugin and it does render the correct amount of numbers depending on how many properties I want to show but I have the same problem 404 pages on any page I try to go unless I manually set the page in the backend.
If I didn't need the option to choose how many properties I want to show I'd just set the number manually but since users can choose between 3 options I can't set this to a fixed number in the backend.
Could anyone tell me what's wrong? Thanks in advance!
I'm not sure if you ever resolved your issue, but for the sake of anyone finding this question you may want to try flushing your permalink structure.
From http://codex.wordpress.org/Rewrite_API/flush_rules:
//Ensure the $wp_rewrite global is loaded
global $wp_rewrite;
//Call flush_rules() as a method of the $wp_rewrite object
$wp_rewrite->flush_rules();
Put that in your functions.php file, refresh your page, and see if that fixes your problem. It has for me in the past when I've had pagination 404 issues.
NOTE: once you have flushed your permalinks, remember to erase those two lines (see above) as you do not need or want that running every time a page is requested - it only needs to be done once. (This entire action may or may not be the same as going to the Permalinks page in your admin console.)

Resources